ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » When does a message go to a DLQ?

Post new topic  Reply to topic Goto page Previous  1, 2
 When does a message go to a DLQ? « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Fri Apr 27, 2018 5:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

The key point here is that messages will arrive on the DLQ from the software when something's wrong with the MQ topology. Your MQ admins will undoubtedly have some kind of monitoring on the DLQ to alert them when this happens. Be sure they're onboard with your plan before an application starts using it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mvic
PostPosted: Fri Apr 27, 2018 7:47 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

bruce2359 wrote:
A DLH is not required to successfully MQPUT a message in the DLQ.

Sorry that this is off-topic, but...

If you omit a DLH then the handler will not know the Q name the message was intended for, or the reason it could not be put.

Hence:

From https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.pro.doc/q002680_.htm
"All messages on the DLQ must be prefixed with a dead-letter header structure, MQDLH"

From https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.pla.doc/q005540_.htm
"Messages put on the DLQ by a queue manager or a message channel agent always have an MQDLH; applications putting messages on the DLQ must supply an MQDLH"
Back to top
View user's profile Send private message
mvic
PostPosted: Fri Apr 27, 2018 7:54 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

Vitor wrote:
messages will arrive on the DLQ from the software when something's wrong with the MQ topology

You can see a message on a DLQ from a receiving MCA if the destination queue is full.
That probably falls halfway inbetween the admins and the app team, as far as responsibility is concerned.
Some people do not configure DLQs, or configure their channels not to use them, as they do have downsides.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 27, 2018 8:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mvic wrote:
Vitor wrote:
messages will arrive on the DLQ from the software when something's wrong with the MQ topology

You can see a message on a DLQ from a receiving MCA if the destination queue is full.


I take your point, though I would still tend to the "something wrong with the MQ topology" in this case; the queue hasn't been sized correctly to account either for the slowness of the consuming app or a period of consuming app downtime.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Apr 27, 2018 11:44 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

mvic wrote:
bruce2359 wrote:
A DLH is not required to successfully MQPUT a message in the DLQ.

Sorry that this is off-topic, but...

If you omit a DLH then the handler will not know the Q name the message was intended for, or the reason it could not be put.

Hence:

From https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.pro.doc/q002680_.htm
"All messages on the DLQ must be prefixed with a dead-letter header structure, MQDLH"

From https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.pla.doc/q005540_.htm
"Messages put on the DLQ by a queue manager or a message channel agent always have an MQDLH; applications putting messages on the DLQ must supply an MQDLH"


"Must?" I stand (sit, actually) by my previous post:
bruce2359 wrote:
A DLH is not required to successfully MQPUT a message in the DLQ.


There is nothing special about the DLQ that prevents an app from puting a message in the DLQ without a DLH. I understand that a DLH is necessary for the dead-letter handler ...
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mvic
PostPosted: Fri Apr 27, 2018 12:40 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

bruce2359 wrote:
There is nothing special about the DLQ that prevents an app from puting a message in the DLQ without a DLH. I understand that a DLH is necessary for the dead-letter handler ...

Well, yes and no. It is counter-productive to even consider omitting the DLH.
There is something special about a DLQ, which is: it must be processed by a handler. And, the handler will need to know the pieces of information that are contained in the DLH (qname, reasoncode, putapplname, etc, etc.).
Actually my purpose in mentioning the DLH in the first place was to remind the OP about the extra things to think about if the application wants to use the DLQ directly.
One of these is: you must include a DLH. It's important to know, and this does take some programming effort, especially if it's your first time writing code to prepend MQ headers to your data.
And if you mess up adding the header, your MQPUT might indeed fail with MQRC_HEADER_ERROR or something similar.
I'll concede this point: if you get that reasoncode or similar back from your MQPUT to the DLQ you should probably just MQPUT the message to the DLQ directly, on the basis that it's better to do that than lose the message.
But get ready for your MQ admin to complain at you that you made their dead letter handler fail.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 27, 2018 9:10 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

mvic wrote:
bruce2359 wrote:
There is nothing special about the DLQ that prevents an app from puting a message in the DLQ without a DLH. I understand that a DLH is necessary for the dead-letter handler ...

Well, yes and no. It is counter-productive to even consider omitting the DLH.
There is something special about a DLQ, which is: it must be processed by a handler. And, the handler will need to know the pieces of information that are contained in the DLH (qname, reasoncode, putapplname, etc, etc.).
Actually my purpose in mentioning the DLH in the first place was to remind the OP about the extra things to think about if the application wants to use the DLQ directly.
One of these is: you must include a DLH. It's important to know, and this does take some programming effort, especially if it's your first time writing code to prepend MQ headers to your data.
And if you mess up adding the header, your MQPUT might indeed fail with MQRC_HEADER_ERROR or something similar.
I'll concede this point: if you get that reasoncode or similar back from your MQPUT to the DLQ you should probably just MQPUT the message to the DLQ directly, on the basis that it's better to do that than lose the message.
But get ready for your MQ admin to complain at you that you made their dead letter handler fail.
Or come back at you talking about header chaining and throwing the pcf header classes at you!!!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Sat Apr 28, 2018 5:07 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Ouch.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Sun Apr 29, 2018 4:58 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

mvic wrote:
Actually my purpose in mentioning the DLH in the first place was to remind the OP about the extra things to think about if the application wants to use the DLQ directly.
One of these is: you must include a DLH. It's important to know, and this does take some programming effort, especially if it's your first time writing code to prepend MQ headers to your data.
And if you mess up adding the header, your MQPUT might indeed fail with MQRC_HEADER_ERROR or something similar.
I'll concede this point: if you get that reasoncode or similar back from your MQPUT to the DLQ you should probably just MQPUT the message to the DLQ directly, on the basis that it's better to do that than lose the message.
But get ready for your MQ admin to complain at you that you made their dead letter handler fail.

This adds complexity to the app design and additional support processes that involves both MQ admin and app support. As an MQ designer, if an app suggested using the qmgr's DLQ, I would recommend against it. I think a better alternative is for the app to have their own DLQ and handler, or if this is not suitable, have their own "ERROR" or "BACKOUT" queue(s), and process them accordingly.
_________________
Glenn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » General Discussion » When does a message go to a DLQ?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.