Class MongoDbChangeStreamMessageProducerSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,P>
org.springframework.integration.dsl.MessageProducerSpec<MongoDbChangeStreamMessageProducerSpec,MongoDbChangeStreamMessageProducer>
org.springframework.integration.mongodb.dsl.MongoDbChangeStreamMessageProducerSpec
- All Implemented Interfaces:
DisposableBean
,FactoryBean<MongoDbChangeStreamMessageProducer>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
public class MongoDbChangeStreamMessageProducerSpec
extends MessageProducerSpec<MongoDbChangeStreamMessageProducerSpec,MongoDbChangeStreamMessageProducer>
- Since:
- 5.3
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ConstructorDescriptionConstruct a builder based on an initialMongoDbChangeStreamMessageProducerSpec
. -
Method Summary
Modifier and TypeMethodDescriptioncollection
(String collection) Configure a collection to subscribe for change events.domainType
(Class<?> domainType) Configure a domain type to convert change event body into.extractBody
(boolean extractBody) Configure a flag to extract body from a change event or use event as a payload.options
(ChangeStreamOptions options) Configure aChangeStreamOptions
.Methods inherited from class org.springframework.integration.dsl.MessageProducerSpec
autoStartup, errorChannel, errorChannel, errorMessageStrategy, id, observationConvention, outputChannel, outputChannel, phase, sendTimeout, shouldTrack
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
MongoDbChangeStreamMessageProducerSpec
Construct a builder based on an initialMongoDbChangeStreamMessageProducerSpec
.- Parameters:
producer
- theMongoDbChangeStreamMessageProducerSpec
to use.
-
-
Method Details
-
domainType
Configure a domain type to convert change event body into.- Parameters:
domainType
- the type to use.- Returns:
- the spec.
-
collection
Configure a collection to subscribe for change events.- Parameters:
collection
- the collection to use.- Returns:
- the spec.
-
options
Configure aChangeStreamOptions
.- Parameters:
options
- theChangeStreamOptions
to use.- Returns:
- the spec.
-
extractBody
Configure a flag to extract body from a change event or use event as a payload.- Parameters:
extractBody
- to extract body or not.- Returns:
- the spec.
-