|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
ERROR 2033, MQRC_NO_MSG_AVAILABLE, But messages in queue |
« View previous topic :: View next topic » |
Author |
Message
|
Vitor |
Posted: Thu Apr 17, 2008 6:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Nroblex wrote: |
Is it possible anyone could send me a pice of code example on this ?? |
There are a number of samples (link at the top of the page).
Nroblex wrote: |
I want to post a message on the queue, that is ok, but I also want some confirmation that the message really has arrived.
|
Confirmation that the message has arrived on the queue is provided by the act of posting not throwing an error. Confirmation that the message has arrived at it's final destination is the COA report mentioned above, but I repeat my urging to think clearly about this - you don't actually need it. WMQ offers assured delivery so once the message is successfully posted it will arrive. This kind of confirmation requirement often stems from syncronous http posting, which uses a different model & technology.
Consider this simplistic scenario. You clearly don't trust the infrastructure (network, WMQ, etc) to deliver your message, so you want confirmation that the message has arrived. You set WMQ to produce a COA message. IF the infrastructure is as unreliable as you believe, how do you know that the COA message will arrive back at your application? In that instance, the message has arrived, report sent, been processed but your application will (presumably) send another message to replace the "lost" one.
Also - what processes the COA messages? Does your posting application wait for confirmation? This could introduce a series delay. Also if a link goes down, your request message could be sat in a transmission queue, not lost but not delivered, for minutes or hours. If the posting application again reacts to the lack of COA by sending another message, again you've got a duplicate.
I could go on. Please search & review some of the discussions on the forum before going down the report route. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Nroblex |
Posted: Thu Apr 17, 2008 11:39 am Post subject: |
|
|
Novice
Joined: 15 Apr 2008 Posts: 11
|
Thanks Vitor!
So if I have a connection and I do not get an exeption when posting the message, the message has arrived ?? Without any kind of reciept?
And if I must have a COA, do I need to configure this on the MQ Server then ?
Many thanks for your answers!
//Nroblex the Swedish MQ newbie |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Apr 17, 2008 12:14 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
You configure the COA as a report option of the MQMD when putting the message. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 17, 2008 2:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Nroblex wrote: |
So if I have a connection and I do not get an exeption when posting the message, the message has arrived ?? Without any kind of reciept? |
Strictly speaking it means the message has been accepted for delivery, not that it's arrived at it's destination. Because you're paying good money for assured delivery software, you can rely on the fact that it will arrive, or your WMQ admin will find out that it hasn't.
This is a principle difference between WMQ & straight TCP/IP. It also allows WMQ to work in the face of network problems in a way straight TCP/IP can't. The Intercommunication manual talks about this in some detail, and may help illuminate your situation.
Nroblex wrote: |
And if I must have a COA, do I need to configure this on the MQ Server then ? |
No, the putting application must request it on a message by message basis. You must also ensure there's a route back through WMQ for the report messages. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Apr 17, 2008 6:20 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
To summarize:
Programmer builds a (request) message consisting of MQMD (message descriptor) and application data payload.
Programmer mqputs (or equivalent) message to a queue. Programmer will be notified synchronously of success or failure of the mqput TO THE FIRST LOCAL QUEUE on the queue manager that the application is mqconnected to. Synchronously means that the program will receive a Reason Code immediately about the success or failure of the mqput.
Programmer MAY request delivery notifications (Report Messages) from downstream queue managers by poopulating the Report Options field of the MQMD (or equivalent). These report messages are created by the downstream queue manager, and are delivered to the application asynchronously. Asynchronously means that they may or may not arrive in a timely manner, based on network failures, downstream application failures, etc..
Some examples of Report Messages:
COA (confirm on arrival) means that the message arrived at the local queue that you named at the remote queue manager.
COD (confirm on delivery) means that the consuming application mqget (or equivalent) the message from the queue.
Exception report messages mean that the message did not get delivered to the queue you named. Probably, it's in the dead-letter-queue at the remote queue manager.
If the application does not populate the report options field, no report messages will be returned.
One last thing: if your application asks for report messages, the application must be coded to recognize the report messages, and do something with them. _________________ 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 |
|
 |
|
|
|
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
|
|
|
|