[jboss-user] [JBoss Messaging] - Re: Message redelivery

imaeses do-not-reply at jboss.com
Tue Feb 27 04:34:13 EST 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022940#4022940

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022940



More information about the jboss-user mailing list