Is it possible to achieve delivery delay when using an QueueChanne
backed by JdbcChannelMessageStore
? The idea is to implement an exponential retry to a target Jms
from the QueueChannel
. Please suggest.
I see several options.
Obvious one: use a RequestHandlerRetryAdvice
on your JMS service activator: https://docs.spring.io/spring-integration/docs/current/reference/html/messaging-endpoints.html#retry-advice. Although this one does not provide a persistence in between retries.
Use a ReceiveMessageAdvice
with a DynamicPeriodicTrigger
to modify its duration
according to the exception and retry state. See SimpleActiveIdleReceiveMessageAdvice
for inspiration: https://docs.spring.io/spring-integration/docs/current/reference/html/core.html#conditional-pollers
Use a Delayer with a JdbcMessageStore
t delay messages when they have been retried: https://docs.spring.io/spring-integration/docs/current/reference/html/messaging-endpoints.html#delayer