[jboss-user] [Messaging, JMS & JBossMQ] - Re: RedeliveryLimit not limiting
miri
do-not-reply at jboss.com
Sat Nov 25 11:55:43 EST 2006
"miri" wrote : "CptnKirk" wrote : I'm trying to use RedeliveryLimit in JBoss 3.2.5. The RedeliveryDelay works as expected.......
|
| Hi, could you please tell me how you made the RedeliveryDelay working? I have a Jboss 3.2.7, standalone asynchronous client with CLIENT_ACKNOWLEDGE, RedeliveryDelay attr of my queue is set (10000). After calling session.recover() (...and not acknowledging the received message), the message is redelivered immediately.
|
...propably some code would help:
Client with CLIENT_ACKNOWLEDGE mode
| public void onMessage(Message msg) {
| //call some logic
| try {
| doSomething();
| } catch (Exception e){
| //error occured, I want the message to be redelivered after some time...
| session.recover();
| //..and exit the onMessage
| return;
| }
| }
|
Queue si configured as follows:
| <mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=queue">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
| <attribute name="RedeliveryDelay">10000</attribute>
| </mbean>
...also i tried to set the JMS_JBOSS_REDELIVERY_DELAY = 10000.
| ((SpyMessage)msg).setLongProperty(SpyMessage.PROPERTY_REDELIVERY_DELAY,10000);
|
I can see in logs then that the property is set in the message correctly BUT the message is redelivered immediately again :(
Any suggestions? Thx much.
Mirek
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988549#3988549
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988549
More information about the jboss-user
mailing list