Author |
Message
|
KAKEZ |
Posted: Wed Jun 18, 2003 12:31 am Post subject: Getting an expired message from a queue - CC & RC values |
|
|
Centurion
Joined: 10 Oct 2002 Posts: 117
|
Hi,
It is said in the documentation that when an application gets an expired message, this one is never returned to the application - OK but question is:
is there a special CompCode and/or Reason code to say that we have just get an expired message?
what value of CompCode can assure us that the expired message has been discarded definitively?
thanks for help
Jack |
|
Back to top |
|
 |
zpat |
Posted: Wed Jun 18, 2003 1:09 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I don't believe the application is notified in any way. The application will get the next available (non-expired) message or "no message available".
If you want something to be notified on expiration - use the event notification message feature of MQ (something I've never used). |
|
Back to top |
|
 |
KAKEZ |
Posted: Wed Jun 18, 2003 3:49 am Post subject: |
|
|
Centurion
Joined: 10 Oct 2002 Posts: 117
|
hello zpat,
what do you mean with "event notification message feature of MQ"?
Jack |
|
Back to top |
|
 |
mqonnet |
Posted: Wed Jun 18, 2003 5:15 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
You should use report options to report an expired message. Dont think expiry generates an event, which i am positive about. But better check.
MQRO_EXPIRATION and others could be used to generate a message when a message expires before being pulled off.
A Message expires immediately after its expiry timeout is over, but still counts to the curdepth of that queue until the next browse/destructive get comes in. This is the time the message is removed from the curdepth count as well and the application is sent 2033.
So to answer your question, yes you would get an rc when a message that has expired on the queue is what you were trying to retrieve and the rc would be 2033.
Hope this helps.
Cheers
Kumar |
|
Back to top |
|
 |
zpat |
Posted: Wed Jun 18, 2003 6:18 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
No, RC 2033 means "NO MSG AVAILABLE".
It does not indicate in any way, shape or form that there was an expired message on the queue. There might have been, there might not have been - the application can't tell by this RC. |
|
Back to top |
|
 |
mqonnet |
Posted: Wed Jun 18, 2003 6:41 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
English has always been a funny language. :)
I might have been misinterpreted here. But look at my previous comments..
"So to answer your question, yes you would get an rc when a message that has expired on the queue is what you were trying to retrieve and the rc would be 2033.
"
The above neither mentioned that this is the only boundary condition nor did it mention the assumptions made.
But it clearly stated that ONLY when you find curdepth > 1 and you know that you ONLY have expired messages on queue, you run your app and you get 2033. Again the assumption here is that all the messages on this queue are expired.
The scope of this discussion was, "if an rc be returned when a get was performed on a message that was expired". And to answer that would be "YES" and which would be 2033.
Cheers
Kumar |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jun 18, 2003 9:54 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
And if you do think about using the Expiration report, remember that this is NOT generated at the time the message expires. It's generated the next time the queue is read and the 'expired' message is discarded, which could be seconds, minutes, days later.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|