Class DelayerEndpointSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>>
org.springframework.integration.dsl.EndpointSpec<S,ConsumerEndpointFactoryBean,H>
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 Summary
Fields inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
adviceChainFields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier 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.Specify aTransactionInterceptorAdvicewith defaultTransactionManagerandDefaultTransactionAttributefor theMessageHandler.transactionalRelease(TransactionInterceptor transactionInterceptor) transactionalRelease(TransactionManager transactionManager) Specify aTransactionInterceptorAdvicewith the providedTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, doGet, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
DelayerEndpointSpec
protected 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.
-
delayedAdvice
Configure 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
-
delayedMessageErrorChannel
Set 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:
-
delayedMessageErrorChannel
Set 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:
-
maxAttempts
Set 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:
-
retryDelay
Set 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:
-
transactionalRelease
Specify aTransactionInterceptorAdvicewith defaultTransactionManagerandDefaultTransactionAttributefor theMessageHandler.- Returns:
- the spec.
- Since:
- 5.0.8
-
transactionalRelease
- Parameters:
transactionInterceptor- theTransactionInterceptorto use.- Returns:
- the spec.
- Since:
- 5.0.8
- See Also:
-
transactionalRelease
Specify aTransactionInterceptorAdvicewith the providedTransactionManagerand defaultDefaultTransactionAttributefor theMessageHandler.- Parameters:
transactionManager- theTransactionManagerto use.- Returns:
- the spec.
- Since:
- 5.2.5
-
delayFunction
Specify 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- theFunctionto determine delay.- Returns:
- the endpoint spec.
-
messageGroupId
Set 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:
-