Search code examples
spring-integrationspring-integration-dsl

Spring Integration Jdbc ChannelMessageStore Repoll Failed Message


Followed the guidance as mentioned in Spring Integration: Persistent and transactional QueueChannel and implemented the Jdbc ChannelMessageStore. Got it to working except for the below,

  1. Poller should pick the failed messages for retry. Failed messages are picked only after a restart
  2. Max retries to discard the message even if transaction fails

Solution

  • Well, with transaction is does that by default: the failed message is not deleted from DB and the next poll should pick it up. I'd be glad to investigate if that is otherwise, but I probably need a simple sample from you. There is no way to have retry attempts on those messages since we work in transaction and therefore rolled back message is just remained in DB as it was before transaction: we cannot modify it. There is a maxAttempts option on a DelayHandler, but that's fully different story.