This commit is contained in:
Soby Chacko
2020-05-08 15:33:35 -04:00
parent df2a8f5c19
commit 5b8cda5228
7 changed files with 38 additions and 8 deletions

View File

@@ -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: `$$<none>$$`)*
//end::configuration-properties[]
//end::ref-doc[]

View File

@@ -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: `$$<none>$$`)*
$$header.enricher.overwrite$$:: $$set to true to overwrite any existing message headers.$$ *($$Boolean$$, default: `$$false$$`)*
//end::configuration-properties[]
//end::ref-doc[]
//end::ref-doc[]

View File

@@ -50,8 +50,8 @@
<groupId>org.springframework.cloud.stream.app.plugin</groupId>
<artifactId>spring-cloud-stream-app-maven-plugin</artifactId>
<configuration>
<generatedApp>
<name>filter</name>
<generatedApp>
<name>header-enricher</name>
<type>processor</type>
<version>${project.version}</version>
<configClass>org.springframework.cloud.fn.header.enricher.HeaderEnricherFunctionConfiguration.class</configClass>

View File

@@ -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: `$$<none>$$`)*
$$redis.consumer.key-expression$$:: $$A SpEL expression to use for storing to a key.$$ *($$String$$, default: `$$<none>$$`)*
$$redis.consumer.queue$$:: $$A literal queue name to use when storing in a queue.$$ *($$String$$, default: `$$<none>$$`)*
$$redis.consumer.queue-expression$$:: $$A SpEL expression to use for queue.$$ *($$String$$, default: `$$<none>$$`)*
$$redis.consumer.topic$$:: $$A literal topic name to use when publishing to a topic.$$ *($$String$$, default: `$$<none>$$`)*
$$redis.consumer.topic-expression$$:: $$A SpEL expression to use for topic.$$ *($$String$$, default: `$$<none>$$`)*
$$spring.redis.client-name$$:: $$Client name to be set on connections with CLIENT SETNAME.$$ *($$String$$, default: `$$<none>$$`)*
$$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: `$$<none>$$`)*
$$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: `$$<none>$$`)*
$$spring.redis.password$$:: $$Login password of the redis server.$$ *($$String$$, default: `$$<none>$$`)*
$$spring.redis.port$$:: $$Redis server port.$$ *($$Integer$$, default: `$$6379$$`)*
$$spring.redis.sentinel.master$$:: $$Name of the Redis server.$$ *($$String$$, default: `$$<none>$$`)*
$$spring.redis.sentinel.nodes$$:: $$Comma-separated list of "host:port" pairs.$$ *($$List<String>$$, default: `$$<none>$$`)*
$$spring.redis.ssl$$:: $$Whether to enable SSL support.$$ *($$Boolean$$, default: `$$false$$`)*
$$spring.redis.timeout$$:: $$Connection timeout.$$ *($$Duration$$, default: `$$<none>$$`)*
$$spring.redis.url$$:: $$Connection URL. Overrides host, port, and password. User is ignored. Example: redis://user:password@example.com:6379$$ *($$String$$, default: `$$<none>$$`)*
//end::configuration-properties[]
//end::ref-doc[]
//end::ref-doc[]

View File

@@ -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

View File

@@ -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;

View File

@@ -1,3 +1,3 @@
spring.redis.host=${embedded.redis.host}
spring.redis.port=${embedded.redis.port}
spring.redis.password=${embedded.redis.password}
spring.redis.password=${embedded.redis.password}