I basically need a message to be redelivered right away or within (1-2) seconds, so I set that attribute on the queue accordingly.
In an MDB, say that I am trying to persist a message to the db but the db goes down. The db will most probably not come back up by the time the message is redelivered and thus result in the message to eventually go into the DLQ.
Is there a way to avoid this by configuring an exponential back off period or assign a message associated redeliver delay? If this is not possible, is it wise to requeue the message from the mdb and supply a scheduled time for delivery?
I am using JBoss Messaging 1.4.0.SP3 with JBoss AS 4.2.3
Yes, JBM supports redelivery delays, see the user guide for more info.