Announcement Announcement Module
No announcement yet.
poisoned pill / redelivery count Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • poisoned pill / redelivery count

    I am wondering if it is possible on the level of

    DefaultMessageListenerContainer to redirect messages with certain redelivery count to a dead letter queue. I am currently using OpenMQ which does not allow to set redelivery count on messages; so, if I get a message which causes consumer to throw an exception and subsequently roll back the transaction I will get into no ending loop. Message is sent back to queue, then I read it from queue, roll back, send it back to queue... forever.

    Does Spring provide a capability to prevent poisoned pills from bringing the system down?

    thank you,


  • #2
    No.... there is no default mechanism for doing so. The issue lies mostly with the different JMS implementations as different vendors have specific ways of dealing with the retryCount. If worse comes to worse, you may have to include a retry count in the actual body of the message.