-
1. Re: Jboss-4.2.1 - Delay redelivery of failed MQ Messages
jgkennedy Aug 8, 2010 11:48 PM (in response to chetan_aggarwal_in)Hi,
I am using JBOSS 4.3.2 and have exactly the same question. I want to introduce a longer delay when a JMS message is redelivered. I've spent some time on this and have found a few old resources and posts. Like several years ago.
The best info seems to be here: http://docs.jboss.org/jbossmessaging/docs/usermanual-2.0.0.beta1/html/undelivered-messages.html
The snippet at the above link reads:
<address-setting match="jms.queue.exampleQueue">
<redelivery-delay>5000</redelivery-delay>
</address-setting>But where exactly would I place this config. The docs are not clear.
In my situation, when I rollback from my MDB, the messages is redelivered 5 or 6 times in quick succession. I like the redelivery count, but I need more time between redelivers. Hasn't been too easy to find this information.
Thanks for any help.
Jim
-
2. Re: Jboss-4.2.1 - Delay redelivery of failed MQ Messages
jgkennedy Aug 9, 2010 3:48 PM (in response to chetan_aggarwal_in)OK, I have this one solved (at least in my situation). This is straightforward.
Here is a helpful snippet:
<mbean code="org.jboss.jms.server.destination.TopicService"
name="jboss.messaging.destination:service=Topic,name=TopicWithOwnRedeliveryDelay"
xmbean-dd="xmdesc/Topic-xmbean.xml">
<depends optional-attribute-name="ServerPeer">
jboss.messaging:service=ServerPeer
</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="RedeliveryDelay">5000</attribute>
</mbean>I found this info at: http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/doc/messaging/JBoss_Messaging_User_Guide/html-single/index.html
Simply locate where you have defined your queues or topics. These should be in the {configuration}/deploy/jms directory. Add the following to your topic or queue:
<attribute name="RedeliveryDelay">5000</attribute>
This is 5 seconds. It works. I did test it.
Jim