Class ReactiveMessageSourceProducer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.endpoint.ReactiveMessageSourceProducer
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,SmartInitializingSingleton,ApplicationContextAware,Lifecycle,Phased,SmartLifecycle,ExpressionCapable,MessageProducer,IntegrationPattern,NamedComponent,ManageableLifecycle,ManageableSmartLifecycle,TrackableComponent
public class ReactiveMessageSourceProducer extends MessageProducerSupport
The
MessageProducerSupport to adapt a provided MessageSource
into a Flux and let it be subscribed in the MessageProducerSupport.subscribeToPublisher(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>>)- Since:
- 5.3
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleCondition, lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger -
Constructor Summary
Constructors Constructor Description ReactiveMessageSourceProducer(MessageSource<?> messageSource)Create an instance based on the providedMessageSource. -
Method Summary
Modifier and Type Method Description protected voiddoStart()Take no action by default.voidsetDelayWhenEmpty(Duration delayWhenEmpty)Configure aDurationto delay next pull request when the previous one was empty.Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
afterSingletonsInstantiated, buildErrorMessage, doStop, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, onInit, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherMethods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName, getComponentType
-
Constructor Details
-
ReactiveMessageSourceProducer
Create an instance based on the providedMessageSource.- Parameters:
messageSource- theMessageSourceto pull for messages.
-
-
Method Details
-
setDelayWhenEmpty
Configure aDurationto delay next pull request when the previous one was empty. Defaults toIntegrationReactiveUtils.DEFAULT_DELAY_WHEN_EMPTY.- Parameters:
delayWhenEmpty- theDurationto use.
-
doStart
protected void doStart()Description copied from class:MessageProducerSupportTake no action by default. Subclasses may override this if they need lifecycle-managed behavior. Protected by 'lifecycleLock'.- Overrides:
doStartin classMessageProducerSupport
-