Search code examples
javaspringspring-bootibm-mq

Push Poison Message to backout Queue[IBM MQ] after certain retries with Spring retry


Step 1: Consuming Message from IBM MQ and processing it.

Step 2: If some message gets failed to process then it will be retried for certain times using spring Retry, but if still issue persists then want to move those messages to Backout Queue.

Note: Spring Retry Part has been done, I want help in pushing Poison Message to Backout Queue after those retries.

Can anyone help me here?


Solution

  • You can use BOTHRESH and BOQNAME attributes of MQ Queue. Once the message backout count reaches the value set on BOTHRESH, the message is moved to backout queue by MQ JMS. More details on poison message handling are here.

    I don't know much about Spring Retry. But if you use MQ JMS Backout mechanism, I wonder if Spring Retry is still required.