Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.91 KB

README.adoc

File metadata and controls

35 lines (22 loc) · 1.91 KB

Standalone Java Consumers

These are self contained Java functions, each implements java.util.function.Consumer and can be used as a component that consumes a value in a variety of streaming application platforms such as Spring Cloud Data Flow, Project RIFF etc. The functions can be run as part of standalone Spring Boot applications.

Available Consumers

cassandra-consumer

A Function<Object, Mono<? extends WriteResult>> consumer to perform an INSERT or UPDATE operation in the Cassandra according provided cassandra, cassandra.cluster and spring.data.cassandra configuration properties. An operation is performed in a reactive manner, so the returned Mono can be combined with some other post-function or subscribed directly in the target application.

log-consumer

A Consumer which accepts incoming messages and logs them using Spring Integration LoggingHandler and LogConsumerProperties configuration properties. If incoming payload is a byte[] and contentType header is text-compatible, it is converted into a String. Otherwise the payload is passing to logging as is. The Apache commons-logging is used as a framework for logging. Any logging library which is able to bridge from commons-logging can be used as a target logging system.

rabbit-consumer

TODO: provide a description

mongo-consumer

A Function<Message<?>,Mono<Void>> which accepts a message and stores the payload to a Mongo DB collection using the ReactiveMongoDbStoringMessageHandler. The message handler uses the reactive Mongo DB drivers so is completely non-blocking.

jdbc-consumer

A Consumer which accepts incoming messages and inserts them into a target relational database. See JdbcConsumerProperties JavaDocs for more information what and how to configure for this consumer.

Note
A respective JDBC driver has to be added into classpath to make this consumer working properly against the target data base.