From 5b8cda5228f1644f0e009f37e90dd852a1ffd749 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Fri, 8 May 2020 15:33:35 -0400 Subject: [PATCH] Cleanup --- .../processor/filter-processor/README.adoc | 1 + .../header-enricher-processor/README.adoc | 4 ++- .../header-enricher-processor/pom.xml | 4 +-- applications/sink/redis-sink/README.adoc | 28 ++++++++++++++++++- ...onfiguration-metadata-whitelist.properties | 5 +++- .../stream/app/redis/sink/RedisSinkTests.java | 2 -- .../src/test/resources/application.properties | 2 +- 7 files changed, 38 insertions(+), 8 deletions(-) diff --git a/applications/processor/filter-processor/README.adoc b/applications/processor/filter-processor/README.adoc index 7b7f435a..ddbe62cd 100644 --- a/applications/processor/filter-processor/README.adoc +++ b/applications/processor/filter-processor/README.adoc @@ -16,6 +16,7 @@ If the incoming type is `byte[]` and the content type is set to `text/plain` or == Options //tag::configuration-properties[] +$$spel.function.expression$$:: $$A SpEL expression to apply.$$ *($$String$$, default: `$$$$`)* //end::configuration-properties[] //end::ref-doc[] diff --git a/applications/processor/header-enricher-processor/README.adoc b/applications/processor/header-enricher-processor/README.adoc index c9a934e3..b2e5f8f3 100644 --- a/applications/processor/header-enricher-processor/README.adoc +++ b/applications/processor/header-enricher-processor/README.adoc @@ -11,6 +11,8 @@ For example `--headers='foo=payload.someProperty \n bar=payload.otherProperty'`. The **$$header-enricher$$** $$processor$$ has the following options: //tag::configuration-properties[] +$$header.enricher.headers$$:: $$\n separated properties representing headers in which values are SpEL expressions, e.g foo='bar' \n baz=payload.baz.$$ *($$Properties$$, default: `$$$$`)* +$$header.enricher.overwrite$$:: $$set to true to overwrite any existing message headers.$$ *($$Boolean$$, default: `$$false$$`)* //end::configuration-properties[] -//end::ref-doc[] \ No newline at end of file +//end::ref-doc[] diff --git a/applications/processor/header-enricher-processor/pom.xml b/applications/processor/header-enricher-processor/pom.xml index a66b9540..299cd995 100644 --- a/applications/processor/header-enricher-processor/pom.xml +++ b/applications/processor/header-enricher-processor/pom.xml @@ -50,8 +50,8 @@ org.springframework.cloud.stream.app.plugin spring-cloud-stream-app-maven-plugin - - filter + + header-enricher processor ${project.version} org.springframework.cloud.fn.header.enricher.HeaderEnricherFunctionConfiguration.class diff --git a/applications/sink/redis-sink/README.adoc b/applications/sink/redis-sink/README.adoc index bb5cb755..ff584c66 100644 --- a/applications/sink/redis-sink/README.adoc +++ b/applications/sink/redis-sink/README.adoc @@ -8,6 +8,32 @@ Sends messages to Redis. The **$$redis$$** $$sink$$ has the following options: //tag::configuration-properties[] +$$redis.consumer.key$$:: $$A literal key name to use when storing to a key.$$ *($$String$$, default: `$$$$`)* +$$redis.consumer.key-expression$$:: $$A SpEL expression to use for storing to a key.$$ *($$String$$, default: `$$$$`)* +$$redis.consumer.queue$$:: $$A literal queue name to use when storing in a queue.$$ *($$String$$, default: `$$$$`)* +$$redis.consumer.queue-expression$$:: $$A SpEL expression to use for queue.$$ *($$String$$, default: `$$$$`)* +$$redis.consumer.topic$$:: $$A literal topic name to use when publishing to a topic.$$ *($$String$$, default: `$$$$`)* +$$redis.consumer.topic-expression$$:: $$A SpEL expression to use for topic.$$ *($$String$$, default: `$$$$`)* +$$spring.redis.client-name$$:: $$Client name to be set on connections with CLIENT SETNAME.$$ *($$String$$, default: `$$$$`)* +$$spring.redis.database$$:: $$Database index used by the connection factory.$$ *($$Integer$$, default: `$$0$$`)* +$$spring.redis.host$$:: $$Redis server host.$$ *($$String$$, default: `$$localhost$$`)* +$$spring.redis.jedis.pool.max-active$$:: $$Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.$$ *($$Integer$$, default: `$$8$$`)* +$$spring.redis.jedis.pool.max-idle$$:: $$Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.$$ *($$Integer$$, default: `$$8$$`)* +$$spring.redis.jedis.pool.max-wait$$:: $$Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.$$ *($$Duration$$, default: `$$-1ms$$`)* +$$spring.redis.jedis.pool.min-idle$$:: $$Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if both it and time between eviction runs are positive.$$ *($$Integer$$, default: `$$0$$`)* +$$spring.redis.jedis.pool.time-between-eviction-runs$$:: $$Time between runs of the idle object evictor thread. When positive, the idle object evictor thread starts, otherwise no idle object eviction is performed.$$ *($$Duration$$, default: `$$$$`)* +$$spring.redis.lettuce.pool.max-active$$:: $$Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.$$ *($$Integer$$, default: `$$8$$`)* +$$spring.redis.lettuce.pool.max-idle$$:: $$Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.$$ *($$Integer$$, default: `$$8$$`)* +$$spring.redis.lettuce.pool.max-wait$$:: $$Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.$$ *($$Duration$$, default: `$$-1ms$$`)* +$$spring.redis.lettuce.pool.min-idle$$:: $$Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if both it and time between eviction runs are positive.$$ *($$Integer$$, default: `$$0$$`)* +$$spring.redis.lettuce.pool.time-between-eviction-runs$$:: $$Time between runs of the idle object evictor thread. When positive, the idle object evictor thread starts, otherwise no idle object eviction is performed.$$ *($$Duration$$, default: `$$$$`)* +$$spring.redis.password$$:: $$Login password of the redis server.$$ *($$String$$, default: `$$$$`)* +$$spring.redis.port$$:: $$Redis server port.$$ *($$Integer$$, default: `$$6379$$`)* +$$spring.redis.sentinel.master$$:: $$Name of the Redis server.$$ *($$String$$, default: `$$$$`)* +$$spring.redis.sentinel.nodes$$:: $$Comma-separated list of "host:port" pairs.$$ *($$List$$, default: `$$$$`)* +$$spring.redis.ssl$$:: $$Whether to enable SSL support.$$ *($$Boolean$$, default: `$$false$$`)* +$$spring.redis.timeout$$:: $$Connection timeout.$$ *($$Duration$$, default: `$$$$`)* +$$spring.redis.url$$:: $$Connection URL. Overrides host, port, and password. User is ignored. Example: redis://user:password@example.com:6379$$ *($$String$$, default: `$$$$`)* //end::configuration-properties[] -//end::ref-doc[] \ No newline at end of file +//end::ref-doc[] diff --git a/applications/sink/redis-sink/src/main/resources/META-INF/dataflow-configuration-metadata-whitelist.properties b/applications/sink/redis-sink/src/main/resources/META-INF/dataflow-configuration-metadata-whitelist.properties index afebf128..e9370bf4 100644 --- a/applications/sink/redis-sink/src/main/resources/META-INF/dataflow-configuration-metadata-whitelist.properties +++ b/applications/sink/redis-sink/src/main/resources/META-INF/dataflow-configuration-metadata-whitelist.properties @@ -1,2 +1,5 @@ -configuration-properties.classes=org.springframework.cloud.fn.consumer.redis.RedisConsumerProperties +configuration-properties.classes=org.springframework.cloud.fn.consumer.redis.RedisConsumerProperties, \ + org.springframework.boot.autoconfigure.data.redis.RedisProperties, \ + org.springframework.boot.autoconfigure.data.redis.RedisProperties$Pool, \ + org.springframework.boot.autoconfigure.data.redis.RedisProperties$Sentinel diff --git a/applications/sink/redis-sink/src/test/java/org/springframework/cloud/stream/app/redis/sink/RedisSinkTests.java b/applications/sink/redis-sink/src/test/java/org/springframework/cloud/stream/app/redis/sink/RedisSinkTests.java index e92f7f1d..037c7cec 100644 --- a/applications/sink/redis-sink/src/test/java/org/springframework/cloud/stream/app/redis/sink/RedisSinkTests.java +++ b/applications/sink/redis-sink/src/test/java/org/springframework/cloud/stream/app/redis/sink/RedisSinkTests.java @@ -16,12 +16,10 @@ package org.springframework.cloud.stream.app.redis.sink; -import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; diff --git a/applications/sink/redis-sink/src/test/resources/application.properties b/applications/sink/redis-sink/src/test/resources/application.properties index c286a3b2..a78ad15d 100644 --- a/applications/sink/redis-sink/src/test/resources/application.properties +++ b/applications/sink/redis-sink/src/test/resources/application.properties @@ -1,3 +1,3 @@ spring.redis.host=${embedded.redis.host} spring.redis.port=${embedded.redis.port} -spring.redis.password=${embedded.redis.password} \ No newline at end of file +spring.redis.password=${embedded.redis.password}