Class ReactiveMongoDbMessageSource

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, MessageSource<org.reactivestreams.Publisher<?>>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

public class ReactiveMongoDbMessageSource
extends AbstractMongoDbMessageSource<org.reactivestreams.Publisher<?>>
An instance of MessageSource which returns a Message with a payload which is the result of execution of a Query. When expectSingleResult is false (default), the MongoDb Query is executed using ReactiveMongoOperations.find(Query, Class) method which returns a Flux. The returned Flux will be used as the payload of the Message returned by the AbstractMessageSource.receive() method.

When expectSingleResult is true, the ReactiveMongoOperations.findOne(Query, Class) is used instead, and the message payload will be a Mono for the single object returned from the query.

Since:
5.3
Author:
David Turanski, Artem Bilan