Author |
Message
|
Subha |
Posted: Wed Nov 11, 2009 9:26 pm Post subject: MQPUT is not failing |
|
|
Apprentice
Joined: 14 Nov 2006 Posts: 33 Location: Toronto
|
hi,
I am trying to put a message in a Remote queue using Queue manager alias.
I am passing Queue name , put options ,queue manager alias name in the accessQueue method call.
It is working fine with no failure.
I expect the call to fail if there is no target queue with the given name. But it is not happening.
Rather the message is being put in the dead letter queue and there is no exception.
My question is, do i need to set anything else to get the correct completion code. Please let me know if i am not clear.
Please help.
Thanks! _________________ Subh |
|
Back to top |
|
 |
gunter |
Posted: Thu Nov 12, 2009 3:33 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
Hi,
if it is possible to write the message in the transmission queue, MQPUT is succsessful. The remote queuemanager cannot respond to a application putting messages.
Gunter _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 12, 2009 7:37 am Post subject: Re: MQPUT is not failing |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Subha wrote: |
I expect the call to fail if there is no target queue with the given name. But it is not happening.
Rather the message is being put in the dead letter queue and there is no exception. |
Your expectation is flawed. If the message can be routed to a valid queue manager (via queue manager alias or other means) then the put will succeed with no exceptions. If the target queue does not exist when the message arrives at it's destination queue manager (directly, via multi-hop, etc, etc) then the message will go to that queue manager's dead letter queue. This is the software working as designed.
Missing queues are the responsibility of the WMQ administrator not your putting application. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Subha |
Posted: Thu Nov 12, 2009 11:25 pm Post subject: |
|
|
Apprentice
Joined: 14 Nov 2006 Posts: 33 Location: Toronto
|
I wanted to make the application aware that the message has not been delivered.
I am trying to achieve it with MQMD report options.
Thanks very much for the responses.
Thanks! _________________ Subh |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Nov 13, 2009 1:29 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Subha wrote: |
I wanted to make the application aware that the message has not been delivered.
I am trying to achieve it with MQMD report options.
Thanks very much for the responses.
Thanks! |
There are better ways of doing this..... Using reports has been discussed a number of times on this forum and I recommend you have a search for them.
Have you considered a monitoring solution which could be used to see how many messages are kicking around on queues and alert accordingly? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 13, 2009 8:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Subha wrote: |
I wanted to make the application aware that the message has not been delivered. |
WMQ is assured messaging software. This means that once the application has put the message it can be sure it will be delivered. If you don't intend to trust this, why are you wasting money on the WMQ license fee?
Subha wrote: |
am trying to achieve it with MQMD report options. |
There have been many discussions in here on why this is a road to hell. The most quoted example is what you do when the message arrives safely at it's destination, but the report message is delayed on it's return? The application will either sit & wait, or timeout assuming the original message didn't arrive. If it responds by re-sending the message, you've just duplicated your data.
At best you've created a tight couple between sender & receiver that WMQ is designed to break. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|