| Author | Message | 
		
		  | vam | 
			  
				|  Posted: Thu Nov 10, 2011 2:50 am    Post subject: DeadLetter Handler |   |  | 
		
		  | Acolyte
 
 
 Joined: 16 Mar 2010Posts: 70
 
 
 | 
			  
				| Need your guidance/Help: 
 If messages in MQ go to deadletter queue of one/specific interface.I know the process to run the deadletter handler.....
 for exp:
 If we have QMGR : DQM2
 and messages moves to DQ:SYSTEM.DEAD.LETTER.QUEUE
 which needs to moved to RQ:RQ1
 then I will run the DLQ as follows:
 
 INPUTQM(DQM2) INPUTQ('SYSTEM.DEAD.LETTER.QUEUE') WAIT(NO)
 ACTION(FWD) FWDQM(DQM2) FWDQ('RQ1') HEADER(NO)
 RUNMQDLQ SYSTEM.DEAD.LETTER.QUEUE DQM2 <D:\Rule.rul
 
 If messages related to 3 to 4 interfaces moves to dead letter queue at a same time.... what is the process we do follow and how we will be using dead letter handler here (or) is there any specific methodology.
 
 Please suggest.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Mr Butcher | 
			  
				|  Posted: Thu Nov 10, 2011 3:49 am    Post subject: |   |  | 
		
		  |  Padawan
 
 
 Joined: 23 May 2005Posts: 1716
 
 
 | 
			  
				| If messages go to the DLQ then there is a reason (problem). You should first find out the reason why the messages are being send to the DLQ (check the dead letter header reason code), fix the problem, and then run the handler, maybe just with a 
 REASON(*) ACTION(RETRY)
 
 rule.
 
 Why forwarding a message to a queue it is already destigned for ?!?
 _________________
 Regards, Butcher
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | vam | 
			  
				|  Posted: Thu Nov 10, 2011 4:56 am    Post subject: DeadLetter Handler |   |  | 
		
		  | Acolyte
 
 
 Joined: 16 Mar 2010Posts: 70
 
 
 | 
			  
				| Thanks for the info. Case:1
 If I need to send all the messages to only one queue,then its ok.
 
 Case:2
 If I need to send in the queue to different queues in the target queue managers.will this work ? please correct me if I was wrong ....
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | exerk | 
			  
				|  Posted: Thu Nov 10, 2011 5:06 am    Post subject: Re: DeadLetter Handler |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 02 Nov 2006Posts: 6339
 
 
 | 
			  
				| 
   
	| vam wrote: |  
	| Case:1 If I need to send all the messages to only one queue,then its ok.
 |  REASON(MQRC1234) ACTION(RETRY) will attempt to move ALL messages with the same reason code to their destination queue.
 
 
 
   
	| vam wrote: |  
	| Case:2 If I need to send in the queue to different queues in the target queue managers.will this work ? please correct me if I was wrong ....
 |  REASON(MQRC1234) ACTION(RETRY) will attempt to move ALL messages with the same reason code to their destination queue.
 
 Or, as Mr Butcher pointed out, you can wildcard.
 _________________
 It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Thu Nov 10, 2011 5:16 am    Post subject: Re: DeadLetter Handler |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| 
   
	| vam wrote: |  
	| Thanks for the info. Case:1
 If I need to send all the messages to only one queue,then its ok.
 
 Case:2
 If I need to send in the queue to different queues in the target queue managers.will this work ? please correct me if I was wrong ....
 |  
 You forgot case 3: You need to make application level business decisions on whether to retry a given message or not.
 
 Case 3: DO NOT USE DLQ.
 
 You need to go back to square one on your error handling and determine if you should instead be using BACKOUT queues instead of DEAD LETTER queues.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bruce2359 | 
			  
				|  Posted: Thu Nov 10, 2011 6:03 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 05 Jan 2008Posts: 9486
 Location: US: west coast, almost. Otherwise, enroute.
 
 | 
			  
				| A message is put to a DLQ when the Message Channel Agent cannot deliver the message to the queue named in the Transmission Queue Header.  The Dead-Letter Header identifies the ReasonCode - why the message could not be delivered. 
 Some of the common reasons that a message cannot be delivered:
 .queue is full
 .message is too big for the queue
 .queue is put-inhibited
 .queue doesn't exist
 
 You need to find the specific reason, and resolve that problem.
 
 Search the InfoCenter or read the WMQ System Administration manual.
 _________________
 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 |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Thu Nov 10, 2011 6:07 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| 
   
	| bruce2359 wrote: |  
	| A message is put to a DLQ when the Message Channel Agent cannot deliver the message to the queue named in the Transmission Queue Header.  The Dead-Letter Header identifies the ReasonCode - why the message could not be delivered. |  
 Or when other applications decide to write messages to the DLQ, with or without a DLH.
 
 For example, Message Broker can send persistent messages to the DLQ with an Application DLRQ.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Thu Nov 10, 2011 6:08 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| bruce2359 wrote: |  
	| A message is put to a DLQ when the Message Channel Agent cannot deliver the message to the queue named in the Transmission Queue Header.  The Dead-Letter Header identifies the ReasonCode - why the message could not be delivered. |  
 Or when a poorly coded WMB flow hits a problem.
 
 Or when an application with poorly designed error handling hits a problem.
 
 I endorse the comments of my most worthy associate in this matter.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bruce2359 | 
			  
				|  Posted: Thu Nov 10, 2011 7:16 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 05 Jan 2008Posts: 9486
 Location: US: west coast, almost. Otherwise, enroute.
 
 | 
			  
				| The purpose and appropriate use of the DLQ is well documented in the WMQ manuals and InfoCenter. 
 Also well-documented here is the inappropriate use of the DLQ.
 _________________
 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 |  | 
		
		  |  | 
		
		  |  |