-
1. Re: DLQ
frito Jul 8, 2003 3:07 AM (in response to monu)Depends on the invoker-proxy-binding configuration for your MDB. The DLQConfig has a value for MaxTimesRedelivered before sending the message to your DLQ.
Greetings,
Frito -
2. Re: DLQ
monu Jul 8, 2003 3:28 AM (in response to monu)Thanks Frito,
I have done that configuration and set the value to "2". I have tried to consume message more than 10 times without acknowledging them but still messages are in the same queue not moving out to DLQ. Could you help me and point out where i am making mistake?
Regards,
Monu -
3. Re: DLQ
adrian.brock Jul 8, 2003 5:56 AM (in response to monu)When you get the message a second time, is the redelivered
flag set?
Regards,
Adrian -
4. Re: DLQ
monu Jul 8, 2003 6:15 AM (in response to monu)Yes,
Second time getJMSRedelivered() method returns TRUE.
One more thing i would like to tell that i m using QueueReceiver not MDB.
What makes a message to move from receiver queue to DLQ.
Regards,
Monu -
5. Re: DLQ
frito Jul 8, 2003 8:23 AM (in response to monu)Are you talking about a standalone application? You can't use a QueueReceiver in a session bean. This is why MDBs where invented ;-)
I missed this fact with your first posting. The DLQ is a configuration for MDBs, used by the container. AFAIK this is not a JMS feature.
Try this approach instead with application server:
Use CMT with MDBs. Configure the QueueConnectionFactory and the Queue as a managed resource for this MDB. The container will enroll the receiving of the message in a transaction. If you don't want to acknowledge the message during processing, use setRollBackOnly of the transactional context. This will put the message back into the source queue (or into the DLQ after MaxTimesRedelivered is reached).
Greetings,
Frito -
6. Re: DLQ
monu Jul 8, 2003 8:58 AM (in response to monu)Thank you very much Frito,
I am talking about stand alone client. How can i put my messages in DLQ once max delivery attempt fails?
Thanks in advance,
--Monu -
7. Re: DLQ
frito Jul 8, 2003 10:56 AM (in response to monu)As I told you: you can't but doing this by yourself (perhaps evaluating the redelivery flag or the message id, counting up for every id and sending the message to your dlq when the message was redelivered too many times), since this is not a JMS feature, it is a JBoss feature for MDBs.
The configuration I told you was a MDB container configuration.
Greetings,
Frito