Author |
Message
|
niraj.tayade |
Posted: Mon Jul 24, 2006 10:51 pm Post subject: How Message Goes in Dead_Letter_Queue? |
|
|
Newbie
Joined: 24 Jul 2006 Posts: 6 Location: Pune
|
Hi to All
I want a sample code for putting the message in DLQ
If I put message in my local queue and that local queue is Inhibited then how messge goes in DLQ
Thanks In Advanced _________________ Regards
Niraj Tayade
Software Developer
Xite etc Software Pvt.Ltd.
Pune,India |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Jul 24, 2006 11:13 pm Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
the dlq is used by the queuemanager, not by the application (you can, but you should not).
if an application tries to put a message to a queue and that put failes, mq cann pass a returncode and conditioncode to the application. it is then up to the application to decide what to do. this is some kind of synchronous processing, there is a connection between the application and mq.
but when you use distributed queueing, it is a little bit different becuase there are multiple UOWs involved, and the processing is asynchronous.
application A puts a message in qmgr 1, qmgr 1 transferes message to qmgr 2 so it can be processed by application B (this are 3 UOWs). now qmgr2 fails to put the message to the target queue. who shall qmgr2 notiry? application A? no. this UOW is already gone and comitted, there is no way to give application A a returncode for this UOW. So qmgr2 tries to put the message to the local DLQ if defined, adding a DLQ header with the reason why the put fails.
if you want to use a similiar processing for the application, then you should consider using the backout queue or something similiar. it is a good advice not to use the dlq for application purposes. _________________ Regards, Butcher |
|
Back to top |
|
 |
niraj.tayade |
Posted: Mon Jul 24, 2006 11:28 pm Post subject: How Message Goes in Dead_Letter_Queue? |
|
|
Newbie
Joined: 24 Jul 2006 Posts: 6 Location: Pune
|
Which setting I want to do in my application for goes the message in DLQ if any problem exists.
Thanx in Advanced _________________ Regards
Niraj Tayade
Software Developer
Xite etc Software Pvt.Ltd.
Pune,India |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Jul 25, 2006 12:22 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
there is not such a setting.
when the application puts and the put fails, you get a returncode and condition code. there is no setting that makes mq place the message in the dlq.
if you want to do that, you have to code it. (open, put, close or put1). but what do you do if that put fails too? _________________ Regards, Butcher |
|
Back to top |
|
 |
niraj.tayade |
Posted: Tue Jul 25, 2006 1:19 am Post subject: What is complete procedure for DLQ? |
|
|
Newbie
Joined: 24 Jul 2006 Posts: 6 Location: Pune
|
Then,how the mesasge goes in DLQ?
If the application fails to put the message in local queue,what happened?
Thanx In Advanced
Niraj _________________ Regards
Niraj Tayade
Software Developer
Xite etc Software Pvt.Ltd.
Pune,India |
|
Back to top |
|
 |
Nigelg |
Posted: Tue Jul 25, 2006 1:47 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
The main cause of a msg being put to the DLQ is if a channel operation fails, e.g. a channel cannot put a persistent msg to a destination queue because the queue is full.
A msg is NOT put to the DLQ if a user app fails to put a msg to a local queue. In that case, the MQPUT returns with a ReasonCode describing the failure; the app then has to take action based on the ReasonCode. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Jul 25, 2006 1:49 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
something makes me feel that you have not read what i wrote.
sorry, i give up on this one. _________________ Regards, Butcher |
|
Back to top |
|
 |
|