Author |
Message
|
javaforvivek |
Posted: Thu Jul 22, 2004 12:37 am Post subject: Put message to Dead Letter Queue from Message Flow |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Hi,
I am developing an WBIMB5+CSD05 message flow application which processes a message and produces a sucess or failure message and puts it to a OUTPUTQ. This message is then read by another message flow and the information in this message is logged to a database. Now this message is of no use.
My qustion is, can we set the expiry date and time to this message and/or put it on the SYSTEM.DEAD.LETTER.QUEUE of WBRK_QM? that is, I will assign Output Queuename to SYSTEM.DEAD.LETTER.QUEUE and simply put the message to this queue. Is it a good idea? _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 22, 2004 5:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What happens when you try it? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PGoodhart |
Posted: Thu Jul 22, 2004 6:08 am Post subject: |
|
|
Master
Joined: 17 Jun 2004 Posts: 278 Location: Harrisburg PA
|
I have done this before. It does work. You can write to any queue on the queue manager, including all of the system queues. _________________ Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin |
|
Back to top |
|
 |
fschofer |
Posted: Thu Jul 22, 2004 6:41 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
IF you do not need the message,
why do you put it out to a queue at all ?
Greetings
Frank |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jul 22, 2004 6:52 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
What reason code are you going to put in the DLH when you put that message to the DLQ?
But I agree with Frank. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Ward |
Posted: Thu Jul 22, 2004 8:20 am Post subject: |
|
|
 Voyager
Joined: 27 Jun 2001 Posts: 98 Location: Europe
|
Yes you can do that, but keep in mind that the expiry will only work at the moment you reed the message from the SYSTEM.DEAD.LETTER.QUEUE after it expired. Unless you have an application that tries to read (or browse) the expired message it will simply stay on the queue.
Cheers,
Ward |
|
Back to top |
|
 |
javaforvivek |
Posted: Fri Jul 23, 2004 12:19 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
fschofer wrote:
Quote: |
IF you do not need the message,
why do you put it out to a queue at all ?
|
Because, I am going to process the message in WBIMB message flow and message flow needs to put this message to some output queue via MQOutput Node.
PeterPotkay wrote:
Quote: |
What reason code are you going to put in the DLH when you put that message to the DLQ?
|
Can you explain what do mean by this question? It may be a very important point that you have, but I am not getting it..!! _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jul 23, 2004 6:13 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
javaforvivek wrote: |
fschofer wrote:
Quote: |
IF you do not need the message,
why do you put it out to a queue at all ?
|
Because, I am going to process the message in WBIMB message flow and message flow needs to put this message to some output queue via MQOutput Node.
PeterPotkay wrote:
Quote: |
What reason code are you going to put in the DLH when you put that message to the DLQ?
|
Can you explain what do mean by this question? It may be a very important point that you have, but I am not getting it..!! |
Dead Letter queues are expected to have messages with Dead Leter Headers, explaining why the message was put there. Messages usually go there because the system (a RCVR MCA channel usually) cannot decide where to put the message. It doesn't know about the queue you want, or about the QM you want, or the queue is full, etc. It has no place for the message, it doesn't know any better where to put it, it cant throw it away, so it puts it into the DLQ, with a header explaining where it was trying to go and why it didn't.
Those headers are important, and are used by Dead Letter Handler programs, or human eyeballs to figure out what to do with the message.
When I asked what reason code you were going to use in the header, I was really trying to make you think of why the DLQ is NOT the place for an application to put its messages to. An application should have logic coded for what to do with a message it doesn't want or can't handle.
If the message is garbage, don't even produce it like Frank said. Why make more work for whatever needs to keep that DLQ clean? That DLQ is not yours, it belongs to the QM, and many other things may legitamatly may need to put messages there.
If you have to produce trash messages, put them to an Exception queue specifically created for your flow, and then you deal with keeping that queue from filling up with expired messages. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
javaforvivek |
Posted: Mon Jul 26, 2004 6:52 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Hi Peter,
Actually,
My message flow has to produce some garbage or trash messages.. and as you know, message flow has to put them to some queue via MQOutput Node.. so if that happens, the trash messages produced by the message flow have to go on some or other queue..
If I create an Exception_Queue, and give Output Queue as Exception Queue in my message flow, will it do?
Is it also possible to set the expiry date and time for the message within the message flow?? so that after certain amount of time, the message will atomatically be moved to DLQ. Then there will be some purging application that will remove messages from DLQ. _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
EddieA |
Posted: Mon Jul 26, 2004 9:07 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Is it also possible to set the expiry date and time for the message within the message flow?? so that after certain amount of time, the message will atomatically be moved to DLQ. |
No. When the message expires, it is silently dropped the next time it would have been read. It does NOT go to the DLQ.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kirani |
Posted: Tue Jul 27, 2004 4:06 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
javaforvivek wrote: |
Because, I am going to process the message in WBIMB message flow and message flow needs to put this message to some output queue via MQOutput Node.
|
Your Message flow need not end with MQOutput node. After DB Insert you don't do anything. Your DB node will not be connected to anything. This will discard your message after DB Insert.
javaforvivek wrote: |
My message flow has to produce some garbage or trash messages.. and as you know, message flow has to put them to some queue via MQOutput Node.. so if that happens, the trash messages produced by the message flow have to go on some or other queue..
|
see my comment above. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
javaforvivek |
Posted: Fri Jul 30, 2004 7:27 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Quote: |
Your Message flow need not end with MQOutput node. After DB Insert you don't do anything. Your DB node will not be connected to anything. This will discard your message after DB Insert.
|
If DBInstert node is not connected further, then where will the message go? Will it be treated as Garbage by the Message Flow? How will it be handled by the Broker.. Any serious consequences of this? _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Jul 31, 2004 8:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
javaforvivek wrote: |
If DBInstert node is not connected further, then where will the message go? Will it be treated as Garbage by the Message Flow? How will it be handled by the Broker.. Any serious consequences of this? |
The message will go nowhere.
The flow will end normally, and the broker will clean up any memory that it can.
If you keep in mind the fact that all of the nodes are basically treated as subroutines within the main flow "program", this makes a little more sense.
The flow program gets a message, runs each node in order until it reaches the last node in the flow, then it loops on to the next message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|