ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL Code for batching messages based on MsgID

Post new topic  Reply to topic
 ESQL Code for batching messages based on MsgID « View previous topic :: View next topic » 
Author Message
AS283107
PostPosted: Mon Oct 03, 2016 12:16 am    Post subject: ESQL Code for batching messages based on MsgID Reply with quote

Newbie

Joined: 03 Oct 2016
Posts: 1

Hello,

Can someone pls help me to implement the below scenario.

Im getting individual messages as input, and i have to club these msgs based on the MessageID field value present in the input.

Ex : i got 10 msgs, its MessageID's are ABC,BCD.
Consider there are 6 msgs with MessageID = ABC, rest are belongs to BCD MessageID.

So the output should have two files, (one for ABC ID and other for BCD ID),
Each files should contain all the messages of same messageID.

Please help me on this
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Oct 03, 2016 12:31 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Can a moderator please move this to the Broker forum.

As to the subject of the post, having MSG_ID's the same (if you are referring to the MQMD.MSGID field) is a bad thing.

Can you please define what you mean by Message ID? Is it part of the message or what?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 03, 2016 4:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

AS283107 wrote:
Ex : i got 10 msgs, its MessageID's are ABC,BCD.
Consider there are 6 msgs with MessageID = ABC, rest are belongs to BCD MessageID.


I agree with my worthy associate that MQ messages with the same MQ message id are bad. MQ Msg Ids set to string values are even worse.

If you want to group MQ messages together, how about giving them the same Group ID? It's intended for that ( the clue is in the name of the field) and you can then use the MQ facilities for handling groups of messages to batch them together.

AS283107 wrote:
So the output should have two files, (one for ABC ID and other for BCD ID),
Each files should contain all the messages of same messageID.


Assuming that messageID is in the payload of a non-MQ message, or that you're determined to stick with the suicidally crazy idea of treated an MQ MSgId as if it's a string and then putting multiply identical bits of business data in it, a Collector node would seem to be the way to go.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 03, 2016 5:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

From a pure algorithm point of view, to "group" things, you need to iterate over all of them and do something to put each element in it's own group.

ESQL does support a select statement, that will make this easier.

As you have been told twice already, and just for additional emphasis...

If you are sending more than one MQ Message with the same MsgId, this is not recommended practice. If only because any logging or monitoring you do won't be able to distinguish between messages without looking at the message body, which is more complicated and means you have to parse the data.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL Code for batching messages based on MsgID
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.