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
adviceChain
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
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
-
Method Summary
Modifier and TypeMethodDescriptiondefaultDelay
(long defaultDelay) delayedAdvice
(Advice... advice) Configure a list ofAdvice
objects that will be applied, in nested order, when delayed messages are sent.delayedMessageErrorChannel
(String channel) Set a message channel name to which anErrorMessage
will be sent if sending the released message fails.delayedMessageErrorChannel
(MessageChannel channel) Set a message channel to which anErrorMessage
will 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 aTransactionInterceptor
Advice
with defaultTransactionManager
andDefaultTransactionAttribute
for theMessageHandler
.transactionalRelease
(TransactionInterceptor transactionInterceptor) transactionalRelease
(TransactionManager transactionManager) Specify aTransactionInterceptor
Advice
with the providedTransactionManager
and defaultDefaultTransactionAttribute
for 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, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, 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
-
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 ofAdvice
objects 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 anErrorMessage
will 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 anErrorMessage
will 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 aTransactionInterceptor
Advice
with defaultTransactionManager
andDefaultTransactionAttribute
for theMessageHandler
.- Returns:
- the spec.
- Since:
- 5.0.8
-
transactionalRelease
- Parameters:
transactionInterceptor
- theTransactionInterceptor
to use.- Returns:
- the spec.
- Since:
- 5.0.8
- See Also:
-
transactionalRelease
Specify aTransactionInterceptor
Advice
with the providedTransactionManager
and defaultDefaultTransactionAttribute
for theMessageHandler
.- Parameters:
transactionManager
- theTransactionManager
to 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
- theFunction
to 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:
-