Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
src
README.adoc
pom.xml

README.adoc

Counter Sink

The counter sink simply counts the number of messages it receives, optionally storing counts in a separate store such as redis.

Input

Headers

N/A

Payload

  • Any

Output

N/A

Options

The counter sink has the following options:

counter.name

The name of the counter to increment. (String, default: <none>)

counter.name-expression

A SpEL expression (against the incoming Message) to derive the name of the counter to increment. (Expression, 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.password

Login password of the redis server. (String, default: <none>)

spring.redis.port

Redis server port. (Integer, default: 6379)

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[]

Build

$ ./mvnw clean install -PgenerateApps
$ cd apps

You can find the corresponding binder based projects here. You can then cd into one one of the folders and build it:

$ ./mvnw clean package

Examples

java -jar counter-sink.jar --name=<name of the counter>

java -jar counter-sink.jar --nameExpression=<name expression>