-
1. Re: Message redelivery
timfox Feb 23, 2007 11:44 AM (in response to imaeses)The MDB container / JCA layer also has its own DLQ - this is configured (normally) in standard-jboss.xml.
This will take precedence over the jboss messaging DLQ - you would need to turn this off, or maybe you want to use it. -
2. Re: Message redelivery
imaeses Feb 26, 2007 5:47 AM (in response to imaeses)Thanks for your reply. I see that MDBConfig in the proxy-factory-config for the invoker proxy takes precedence. However, I still see no way to configure the *delay* between message redeliveries. Is this still possible to configure?
-
3. Re: Message redelivery
imaeses Feb 27, 2007 4:34 AM (in response to imaeses)Perhaps it would be helpful to explain *why* the delay is necessary. Again, the current situation is that if a message is delivered to an MDB and the transaction is rolled back, the message is immediately and repeatedly redelivered until the maximum amount of times has been reached.
We have two MDB's. Let's call them A and B. A reacts to an incoming message and performs an action that results in an eventual message to B. The amount of time that passes between A's action and the eventual arrival of a message to B is unquantifiable. Therefore, it is possible (and indeed likely in certain cases) that the message to B arrives before A's onMessage() completes.
In this case, any data created by A will not be visible to B since its transaction is still open. B cannot complete its work until it has this information available to it. Detecting this situation, it manually rolls back the transaction. Once A's transaction has completed, B can complete its work.
Unfortunately, what happens now is that B's message is redelivered so quickly that A never has a change to complete before B's message is trashed. Although increasing the maximum amount of retries is possible, this is a poor solution at best since the application server wastes precious resources.
Therefore, I ask again: is it possible in JBoss Messaging to configure the message redelivery delay?
Many thanks,
Adam -
4. Re: Message redelivery
timfox Feb 27, 2007 4:44 AM (in response to imaeses)"imaeses" wrote:
Therefore, I ask again: is it possible in JBoss Messaging to configure the message redelivery delay?
In 1.2, yes, in 1.0.1, no.
Have a look at the destination and server peer mbean config.
Queue/Topic:<attribute access="read-write" getMethod="getRedeliveryDelay" setMethod="setRedeliveryDelay"> <description>The delay before redelivering</description> <name>RedeliveryDelay</name> <type>long</type> </attribute>
ServerPeer<attribute access="read-write" getMethod="getDefaultRedeliveryDelay" setMethod="setDefaultRedeliveryDelay"> <description>How long to wait before redelivery, can be overridden on the destination</description> <name>DefaultRedeliveryDelay</name> <type>long</type> </attribute>
-
5. Re: Message redelivery
imaeses Feb 27, 2007 10:20 AM (in response to imaeses)Hi Tim,
Thanks for the reply. Here's my problem: we aren't prepared to roll the 1.2 version into production because it's not a general release yet. We'd prefer to use the 1.0.1 version since it is stable. However, this one feature is quite important.
Are you planning on enabling this feature in a SP release in the near future?
If not, could you give me a hint where in the code I should go to implement this myself.
Many thanks,
Adam -
6. Re: Message redelivery
ovidiu.feodorov Feb 27, 2007 7:46 PM (in response to imaeses)1.2.0 will go GA tomorrow.
-
7. Re: Message redelivery
stephen.campbell May 18, 2007 10:56 AM (in response to imaeses)Hi Guys,
I know its been a month since you all had this conversation, i was wondering if anyone ever got this to work. I downloaded Version 1.2.0sp1 yesterday and dont seem to be able to get the redelivery delay to work. I have posted my setup for the queue below.
Anyone have any ideas???????
<mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=retryMessage" xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
jboss.messaging:service=PostOffice
30000 -
8. Re: Message redelivery
stephen.campbell May 18, 2007 10:59 AM (in response to imaeses)ok set-up didnt appear quite as i was hoping but heres another go
<mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=retryMessage" xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">
jboss.messaging:service=ServerPeer </ depends>
jboss.messaging:service=PostOffice</ depends>
< attribute name="RedeliveryDelay">30000</ attribute>
</ mbean> -
9. Re: Message redelivery
timfox May 23, 2007 3:46 PM (in response to imaeses)This thread is a dupe of http://www.jboss.org/index.html?module=bb&op=viewtopic&t=109165
-