stockMessageGenerator) {
// Run every second.
@@ -83,7 +83,7 @@ public class StockExchangeAnalyticsExample {
String message = stockMessageGenerator.get();
// Submit new message using the stockMessageGenerator to generate random stock messages.
- counterConsumer.accept(MessageBuilder.withPayload(message).build());
+ analyticsConsumer.accept(MessageBuilder.withPayload(message).build());
// Print current stock meters
System.out.println(meterRegistry.getMeters().stream()
diff --git a/consumer/counter-consumer/src/test/resources/data/stock_appl.json b/consumer/analytics-consumer/src/test/resources/data/stock_appl.json
similarity index 100%
rename from consumer/counter-consumer/src/test/resources/data/stock_appl.json
rename to consumer/analytics-consumer/src/test/resources/data/stock_appl.json
diff --git a/consumer/counter-consumer/src/test/resources/data/stock_vmw.json b/consumer/analytics-consumer/src/test/resources/data/stock_vmw.json
similarity index 100%
rename from consumer/counter-consumer/src/test/resources/data/stock_vmw.json
rename to consumer/analytics-consumer/src/test/resources/data/stock_vmw.json
diff --git a/consumer/counter-consumer/src/main/java/org/springframework/cloud/fn/consumer/counter/StringToSpelConversionFunction.java b/consumer/counter-consumer/src/main/java/org/springframework/cloud/fn/consumer/counter/StringToSpelConversionFunction.java
deleted file mode 100644
index 2f7e21e1..00000000
--- a/consumer/counter-consumer/src/main/java/org/springframework/cloud/fn/consumer/counter/StringToSpelConversionFunction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2020-2020 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.cloud.fn.consumer.counter;
-
-import java.util.function.Function;
-
-import org.springframework.expression.EvaluationContext;
-import org.springframework.expression.Expression;
-import org.springframework.expression.ParseException;
-import org.springframework.expression.spel.standard.SpelExpression;
-import org.springframework.expression.spel.standard.SpelExpressionParser;
-
-/**
- * Converter from String to Spring Expression.
- *
- * TODO: This could be a top level project.
- */
-public class StringToSpelConversionFunction implements Function {
-
- private final SpelExpressionParser parser;
-
- private final EvaluationContext evaluationContext;
-
- public StringToSpelConversionFunction(EvaluationContext evaluationContext) {
- this(new SpelExpressionParser(), evaluationContext);
- }
-
- public StringToSpelConversionFunction(SpelExpressionParser parser, EvaluationContext evaluationContext) {
- this.evaluationContext = evaluationContext;
- this.parser = parser;
- }
-
- @Override
- public Expression apply(String source) {
- try {
- Expression expression = parser.parseExpression(source);
- if (expression instanceof SpelExpression) {
- ((SpelExpression) expression).setEvaluationContext(evaluationContext);
- }
- return expression;
- }
- catch (ParseException e) {
- throw new IllegalArgumentException(String.format(
- "Could not convert '%s' into a SpEL expression", source), e);
- }
- }
-}
diff --git a/consumer/counter-consumer/src/test/java/org/springframework/cloud/fn/consumer/counter/ConverterFunctionAdapter.java b/consumer/counter-consumer/src/test/java/org/springframework/cloud/fn/consumer/counter/ConverterFunctionAdapter.java
deleted file mode 100644
index f41ae10e..00000000
--- a/consumer/counter-consumer/src/test/java/org/springframework/cloud/fn/consumer/counter/ConverterFunctionAdapter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2020-2020 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.cloud.fn.consumer.counter;
-
-import java.util.function.Function;
-
-import org.springframework.core.convert.converter.Converter;
-
-/**
- * @author Christian Tzolov
- */
-public class ConverterFunctionAdapter implements Converter {
-
- private Function function;
-
- public ConverterFunctionAdapter(Function function) {
- this.function = function;
- }
-
- @Override
- public T convert(S s) {
- return this.function.apply(s);
- }
-}
diff --git a/pom.xml b/pom.xml
index a88e2998..34569152 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
common/tensorflow-common
consumer/cassandra-consumer
- consumer/counter-consumer
+ consumer/analytics-consumer
consumer/file-consumer
consumer/ftp-consumer
consumer/geode-consumer