Author |
Message
|
JeffM. |
Posted: Fri Aug 11, 2006 5:57 am Post subject: Message groups |
|
|
Newbie
Joined: 26 Jul 2006 Posts: 9 Location: Albany, NY
|
Hi all,
Being relatively new to MQ I have a question that is fairly basic but thought I could get some good insight here...
When processing messages in a group I've specified the following MQGMO options:
gmo.options = MQC.MQGMO_ALL_MSGS_AVAILABLE | MQC.MQGMO_COMPLETE_MSG
| MQC.MQGMO_LOGICAL_ORDER | MQC.MQGMO_SYNCPOINT
| MQC.MQGMO_WAIT | MQC.MQGMO_VERSION_3;
Works great, but if a message gets "lost" or perhaps sent to the DLQ then I no longer have a complete group of messges and the rest of the messages in the group just sit there and don't get processed because the group will never be completed... I'm wondering how you would handle this situation.
I willl have a monitor that checks for "stale" messages and sends a notification, but I'd like to process these messages automatically (i.e., in my MQ app). Suggestions on the best way to identify these orphaned messages are appreciated.
Thanks.
Jeff M. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 11, 2006 5:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Use expiry. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JeffM. |
Posted: Fri Aug 11, 2006 6:11 am Post subject: |
|
|
Newbie
Joined: 26 Jul 2006 Posts: 9 Location: Albany, NY
|
Thank you for the response. I can't lose the message, though. Won't that cause the message to be deleted after the expiration? I still need to process the remaining messages. I know this isn't the most complicated process - I'm just trying to see it from angles I may not have thought of. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 11, 2006 6:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Um.
If you have an incomplete group, are you sure you need to process it? Doesn't that indicate that something went wrong?
Also, you can use report options to ensure that expired messages get deposited on a queue somewhere, from which they can be examined and reprocessed. "Report with full data". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Aug 11, 2006 7:11 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Couldn't use also run a DLQ handler to process the message back to the correct queue? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 11, 2006 7:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Only if they went to the DLQ in the first place, and the sending app didn't just forget to send one message in a group. Or had an off-by-one error on the grouping logic. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JeffM. |
Posted: Fri Aug 11, 2006 7:59 am Post subject: |
|
|
Newbie
Joined: 26 Jul 2006 Posts: 9 Location: Albany, NY
|
Well you would think if there was a "missing" message in a group that would indicate failure of some sort... and it does but the processing that does this isn't in my MQ App, or MQ relevant... it happens on a completely seperate process on a mainframe.
So I do still need to process the remaining messges.... |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 11, 2006 8:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Then don't wait until all messages are available...
Or use expiry, and have a second process that handles expired partial groups. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JeffM. |
Posted: Fri Aug 11, 2006 8:11 am Post subject: |
|
|
Newbie
Joined: 26 Jul 2006 Posts: 9 Location: Albany, NY
|
catch 22... because I need to know that when I do process them they are all there and accounted for, as I have to process them [i.e., parse and insert into an oracle db] all at once [commit them all together]. I need to find a good way to identify broken groups, so I can process them together but with known problems.
Is there a way to identify messages that belong to an incompete group?
How do I go about processing expired partial groups? Not instructions but what topic would that be under? I haven't seen any reference to doing that but sounds promising. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 11, 2006 2:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
JeffM. wrote: |
catch 22... because I need to know that when I do process them they are all there and accounted for, as I have to process them [i.e., parse and insert into an oracle db] all at once [commit them all together]. I need to find a good way to identify broken groups, so I can process them together but with known problems.
Is there a way to identify messages that belong to an incompete group?
How do I go about processing expired partial groups? Not instructions but what topic would that be under? I haven't seen any reference to doing that but sounds promising. |
If a message is expired (in a group or not) then it will get itself deleted. Is there some point in the business processing cycle where grouped messages are not sent? They could then be a second process that clears out all the messages left on the queue, i.e. those not read off because they're part of a complete group.
Question is - what do you do with them? If they've not been sent because of an application error in the sending app as jefflowrey suggests, what processing can you apply? And if you can still process these incomplete groups, why are you waiting for the groups to be complete?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 14, 2006 1:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Again, the sending application specifies that messages expire, and that it wants a report with full data. It then specifies a replyto queue.
When messages it sends expire, then the report of the expired message (including the full data) goes to the replyto queue.
Then you can process from that. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
tleichen |
Posted: Mon Aug 14, 2006 10:49 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
JeffM. wrote: |
catch 22... because I need to know that when I do process them they are all there and accounted for, as I have to process them [i.e., parse and insert into an oracle db] all at once [commit them all together]. I need to find a good way to identify broken groups, so I can process them together but with known problems.
|
But you still need to have some way of rejecting (presumably) groups that never complete. Don't say it can't happen!  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
|