Configuring a 'retry delay' in MQ Series

五迷三道 提交于 2019-11-30 05:18:28

This is likely to be an opportunity to craft a little infrastructure for such an issue.

Since you can look at the JMSDeliveryCount when the message has entered the bean (before you process it -- consider commit scope) and you can see that it has had a couple of rollbacks already, send the message around to a staging queue but attach the destination queue name in the jms properties so you can use it later.

A simple process can run on some interval to clear the staging queue (every 5 minutes for example) and send the message on to a routing queue.

Another process can sit on the routing queue and look at the jms properties (which added the destination queue name to) and send the message along to the orginal destination.

It's a poor man's broker but it will acheive the goal. It is true that there is not much built in to really do what you want.

I think you're out of luck. As far as I know the only parameters you can tweak in this scenario is the max number of times the message will be retried (BOTHRESH) and the name of the exception/backout queue (BOQUEUE) where the message will be sent if the number of retry attempts exceeds the max.

Paal

You can specify a retry limit so that the continuous rollback will stop after a specified attempts.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!