Class DelayerEndpointSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<DelayerEndpointSpec, reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, DelayHandler>>
org.springframework.integration.dsl.EndpointSpec<DelayerEndpointSpec, ConsumerEndpointFactoryBean, DelayHandler>
org.springframework.integration.dsl.ConsumerEndpointSpec<DelayerEndpointSpec, DelayHandler>
org.springframework.integration.dsl.DelayerEndpointSpec
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean, DelayHandler>>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
- See Also:
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.ConsumerEndpointSpecadviceChainFields inherited from class org.springframework.integration.dsl.EndpointSpeccomponentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondefaultDelay(long defaultDelay) delayedAdvice(Advice... advice) Configure a list ofAdviceobjects that will be applied, in nested order, when delayed messages are sent.delayedMessageErrorChannel(String channel) Set a message channel name to which anErrorMessagewill be sent if sending the released message fails.delayedMessageErrorChannel(MessageChannel channel) Set a message channel to which anErrorMessagewill be sent if sending the released message fails.delayExpression(String delayExpression) delayExpression(Expression delayExpression) delayFunction(Function<Message<P>, Object> delayFunction) Specify the function to determine delay value againstMessage.ignoreExpressionFailures(boolean ignoreExpressionFailures) maxAttempts(int maxAttempts) Set the maximum number of release attempts for when message release fails.messageGroupId(String messageGroupId) Set a group id to manage delayed messages by this handler.messageStore(MessageGroupStore messageStore) retryDelay(long retryDelay) Set an additional delay to apply when retrying after a release failure.taskScheduler(TaskScheduler taskScheduler) Set a providedTaskSchedulerinto theDelayHandler, as well as callsuperto set it into an endpoint for this handler (if necessary).Specify aTransactionInterceptorAdvicewith defaultTransactionManagerandDefaultTransactionAttributefor theMessageHandler.transactionalRelease(TransactionInterceptor transactionInterceptor) transactionalRelease(TransactionManager transactionManager) Specify aTransactionInterceptorAdvicewith the providedTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpecadvice, async, autoStartup, customizeMonoReply, doGet, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, transactional, transactional, transactional, transactional, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpecassertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Constructor Details- 
DelayerEndpointSpecprotected DelayerEndpointSpec()
- 
DelayerEndpointSpec
 
- 
- 
Method Details- 
defaultDelay- Parameters:
- defaultDelay- the defaultDelay.
- Returns:
- the endpoint spec.
- See Also:
 
- 
ignoreExpressionFailures- Parameters:
- ignoreExpressionFailures- the ignoreExpressionFailures.
- Returns:
- the endpoint spec.
- See Also:
 
- 
messageStore- Parameters:
- messageStore- the message store.
- Returns:
- the endpoint spec.
 
- 
delayedAdviceConfigure a list ofAdviceobjects that will be applied, in nested order, when delayed messages are sent.- Parameters:
- advice- the advice chain.
- Returns:
- the endpoint spec.
 
- 
delayExpression
- 
delayExpression
- 
delayedMessageErrorChannelSet a message channel to which anErrorMessagewill be sent if sending the released message fails. If the error flow returns normally, the release is complete. If the error flow throws an exception, the release will be re-attempted. If there is a transaction advice on the release task, the error flow is called within the transaction.- Parameters:
- channel- the channel.
- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
 
- 
delayedMessageErrorChannelSet a message channel name to which anErrorMessagewill be sent if sending the released message fails. If the error flow returns normally, the release is complete. If the error flow throws an exception, the release will be re-attempted. If there is a transaction advice on the release task, the error flow is called within the transaction.- Parameters:
- channel- the channel name.
- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
 
- 
maxAttemptsSet the maximum number of release attempts for when message release fails. Default 5.- Parameters:
- maxAttempts- the max attempts.
- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
 
- 
retryDelaySet an additional delay to apply when retrying after a release failure. Default 1000L.- Parameters:
- retryDelay- the retry delay.
- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
 
- 
transactionalReleaseSpecify aTransactionInterceptorAdvicewith defaultTransactionManagerandDefaultTransactionAttributefor theMessageHandler.- Returns:
- the spec.
- Since:
- 5.0.8
 
- 
transactionalRelease- Parameters:
- transactionInterceptor- the- TransactionInterceptorto use.
- Returns:
- the spec.
- Since:
- 5.0.8
- See Also:
 
- 
transactionalReleaseSpecify aTransactionInterceptorAdvicewith the providedTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.- Parameters:
- transactionManager- the- TransactionManagerto use.
- Returns:
- the spec.
- Since:
- 5.2.5
 
- 
delayFunctionSpecify the function to determine delay value againstMessage. Typically used with a Java 8 Lambda expression:.<Foo>delay("delayer", m -> m.getPayload().getDate(), c -> c.advice(this.delayedAdvice).messageStore(this.messageStore()))- Type Parameters:
- P- the payload type.
- Parameters:
- delayFunction- the- Functionto determine delay.
- Returns:
- the endpoint spec.
 
- 
messageGroupIdSet a group id to manage delayed messages by this handler. Required.- Parameters:
- messageGroupId- the group id for delayed messages.
- Returns:
- the endpoint spec.
- Since:
- 6.2
- See Also:
 
- 
taskSchedulerSet a providedTaskSchedulerinto theDelayHandler, as well as callsuperto set it into an endpoint for this handler (if necessary).- Overrides:
- taskSchedulerin class- ConsumerEndpointSpec<DelayerEndpointSpec, DelayHandler>
- Parameters:
- taskScheduler- the- TaskSchedulerto use.
- Returns:
- the spec
- See Also:
 
 
-