Author |
Message
|
fmottais |
Posted: Wed Aug 29, 2007 6:57 am Post subject: Try to read Header MQDLH with a jms program |
|
|
Novice
Joined: 30 May 2007 Posts: 10
|
Hi,
I would like to read with a Java JMS program, the Dead-letter Queue header, and specialy the DestQName to repost my message.
I have no problem to connect to my QManager and My Dead-Letter Queue, but I not find property to read the Dead-letter Header (DestQName).
Did some one coult help me?
thank a lot
Best regard
Frederic |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 29, 2007 7:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
No idea on the Java (someone else will be along in a minute) but if all you want to do is repost the message why not use the dead letter handler supplied? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fmottais |
Posted: Wed Aug 29, 2007 7:22 am Post subject: |
|
|
Novice
Joined: 30 May 2007 Posts: 10
|
thanks for your answer.But I need to explain a little bit more my question.
This program is to repost some messages in the Dead Letter Queue to the original queue.
In fact, I use Webshepe Message Broker and when I've got a Exception in a flow, the message go to the Dead Letter queue.
So, I need to select the message in the dead letter queue to repost it into the original queue. The original queue name is in the DestQName of the MQDLH.
Regrettably, the dead letter handler is not the solution of my problem because I don't want to repost systematically all messages in the dead Letter queue, but only selected message. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 29, 2007 7:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You are better served by a) configuring a backout queue, rather than using the Dead Letter Queue, and then b) writing a message flow to process the backout queue and requeue the correct messages.
Among other things, you won't have a DLH this way. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Meenakshi Dhawale |
Posted: Wed Aug 29, 2007 9:58 am Post subject: |
|
|
Novice
Joined: 29 May 2007 Posts: 12 Location: India
|
There is a support pack named as "mo01_win.zip" that helps to find out the name of destination Q Name and it also provides the reason due to which messages are put to dead letter queue |
|
Back to top |
|
 |
EddieA |
Posted: Wed Aug 29, 2007 2:00 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
I posted some Java code, quite a while ago, that showed how to read additional MQ headers. You could try searching for it. But that was pure Java, not JMS.
Basically, you get both the additional headers, and the data payload, when you get the message. You then have to read the header portion field by field.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fmottais |
Posted: Tue Sep 04, 2007 1:57 am Post subject: |
|
|
Novice
Joined: 30 May 2007 Posts: 10
|
thanks for your anwer.
I now arrive to read a message in the Dead Letter with JMS. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 04, 2007 2:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you are going single message by single message RFHUtil(IH03) has some capabilities in this field.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 04, 2007 2:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're much better off using a backout queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|