|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Dead letter queue |
« View previous topic :: View next topic » |
Author |
Message
|
kiranraj |
Posted: Thu Oct 06, 2005 3:27 am Post subject: Dead letter queue |
|
|
Novice
Joined: 19 Sep 2005 Posts: 12
|
Hi,
If I wait for a synchronous response on the queue and if i get the response asynchronously, the message stays on the queue. Can I direct the lying message to the dead letter queue automatically? can i set the expiry time of the message? Is the unit that i set in java in minutes?
for example mess.expirty = 1; does it mean that the message lies on queue for 1 minute?
Thanks. _________________ Thanks. |
|
Back to top |
|
 |
hopsala |
Posted: Thu Oct 06, 2005 5:02 am Post subject: Re: Dead letter queue |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
kiranraj wrote: |
If I wait for a synchronous response on the queue and if i get the response asynchronously, the message stays on the queue. |
It took me quite a while to get what you mean here... Anyway, the solution is to use expiry.
kiranraj wrote: |
Can I direct the lying message to the dead letter queue automatically? |
No, messages are directed to DLQ only upon problems putting to queues, not upon application errors or expiry; you can, however, write in your code a section that sends the message to DLQ if there are problems, that is, if msg did not expire - Expired messages are gone and dead, no way to get them back. You can also use reports.
I believe you're harbouring some false MQ notion, but I can't put my finger on it; please explain yourself more clearly - why is setting the expiry not enough? why do you need it in the DLQ after it had expired?
kiranraj wrote: |
can i set the expiry time of the message? Is the unit that i set in java in minutes?
for example mess.expirty = 1; does it mean that the message lies on queue for 1 minute? |
How's about opening the manual, eh? |
|
Back to top |
|
 |
kevinf2349 |
Posted: Thu Oct 06, 2005 5:21 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
I am not 100% sure what you meant by :
Quote: |
If I wait for a synchronous response on the queue and if i get the response asynchronously, the message stays on the queue. |
But I assume you mean that you are setting the MQGET wait limit to something really short or letting it default?
Personally I think this is a terrible design, however, if you must do this then, as Hopsla indicated, you must write the recovery side of things yourself.
My question is...why even request a reply if you are not going to wait for a little while for the response? It would seem to me that you are going to be hitting your recovery code more than your desired code path.
You do know that setting the MQGET wait to say 5 seconds doesn't mean that MQ waits 5 seconds before it actually gets the message right? If a message hits the queue within 2 seconds then MQ will return that message to your program as soon as it arrives on the queue.
Now....if you really, really want to ge tthe message onto the systems DLQ then you can do this by using a temporary dynamic queue for the reply and closing the queue once the GET fails.....but this is sucky design.
Hope this helps |
|
Back to top |
|
 |
hopsala |
Posted: Thu Oct 06, 2005 5:50 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
kevinf2349 wrote: |
I am not 100% sure what you meant |
Yea, this is one vague post; I think he meant that he has a synchronous application (end-user) which queries using MQ, does a wait=60 MQGET, and that after 60 secs the user receives a "no reply" message and goes about his buisness. Allors when the reply message arrives, there's no one to read it.
kevinf2349 wrote: |
Now....if you really, really want to ge tthe message onto the systems DLQ then you can do this by using a temporary dynamic queue for the reply and closing the queue once the GET fails.....but this is sucky design. |
That is by far and wide, the worst design concept i've ever heard of, coupled with the most creative! Cheers! |
|
Back to top |
|
 |
kiranraj |
Posted: Thu Oct 06, 2005 6:15 am Post subject: Dead letter queue |
|
|
Novice
Joined: 19 Sep 2005 Posts: 12
|
Hi,
I dont want to have the messages lying on my queue forever. After expiry, the messages lie on the queue although they cant be retrieved. I want to clear these messages periodically or at a particular time . For that can i set any property of the queue or message?
I have seen that "Since a message whose expiry time has elapsed may not actually be discarded until later, there may be messages on a queue that have passed their expiry time, and which are not therefore eligible for retrieval. These messages nevertheless count towards the number of messages on the queue for all purposes, including depth triggering." _________________ Thanks. |
|
Back to top |
|
 |
hopsala |
Posted: Thu Oct 06, 2005 6:30 am Post subject: Re: Dead letter queue |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
kiranraj wrote: |
I dont want to have the messages lying on my queue forever. After expiry, the messages lie on the queue although they cant be retrieved. I want to clear these messages periodically or at a particular time . For that can i set any property of the queue or message? |
Ah, so why didn't you say so in the first place? This topic is a rather popular one here, for example Expired messages cleaning, and there are many others out there, use the Search button!
However, I still don't see what the DLQ has to do with all this... |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|