|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ triggering and group of messages |
« View previous topic :: View next topic » |
Author |
Message
|
zpat |
Posted: Wed Nov 13, 2013 2:29 am Post subject: MQ triggering and group of messages |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Assume someone sends a group of messages (using groupid and the flags message in group and last message in group as appropriate) to a triggered queue with trigger type first.
Will the trigger message be generated on arrival of the first message, or only when the complete group of messages arrives on the queue (i.e. when the message with last message in group flag arrives)? |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Nov 13, 2013 3:25 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Well of course the simplest thing to do would be to try it but if I remember correctly the trigger message will be on the first message of the group. After all, MQ doesn't know that the targeted application can only process the whole group or indeed that all messages for this group will ever appear on this local queue at one time. Consider, for example, a message which is part of a group travelling across a channel.
Now, although the trigger message is created at the first message it will also be in the same transaction (sort of) as that message so, if an application put 20 message in the group and then issued MQCMIT() it is only at commit time that the trigger message would cause the trigger monitor to start the application.
Of course the receiving application can specify MQGMO_ALL_MSGS_AVAILABLE if it likes to ensure that it doesn't start processing an incomplete group.
There are other techniques you can use. You could have a 'request' queue which is used just for sending around the request messages and a 'data' queue which contains your ancillary messages which would contain your groups of messages. You can put messages to the 'data' queue to your hearts content. Only when things are as you like them do you send a 'request' message containing information about the group if necessary on the data queue. It is only the request message which would cause any triggering.
Hope that helps,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
zpat |
Posted: Wed Nov 13, 2013 3:49 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Thanks.
As it happens, I was thinking of triggering MA01 (Q program) to write the contents of the queue to a file.
I don't think this has an option for "all messages available" on the input queue though. |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Nov 13, 2013 4:03 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Hi,
No, I'm afraid it doesn't. I'd offer to add it for you but, sadly, IBM won't let me continue to develop MA01.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
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
|
|
|
|