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 » Counting messages in MQSI

Post new topic  Reply to topic
 Counting messages in MQSI « View previous topic :: View next topic » 
Author Message
twegmann
PostPosted: Mon Mar 31, 2003 12:03 pm    Post subject: Counting messages in MQSI Reply with quote

Novice

Joined: 09 Aug 2001
Posts: 23
Location: New Jersey

Hoping some one can advise on best way to count messages in a message flow. From one input queue, I need to route messages to one of three output queues (based on a value in the message). Some of the messages go to all three output queues, some go to only a particular output queue.

After all the messages have been drained from the input queue, I want to send one final message to each of the three output queues. This 'final' message is the count of how many messages I placed on each output queue.

So my question is - how can I best setup a counter for each output queue and increment it each time I traverse that 'leg' of the message flow ?
Back to top
View user's profile Send private message
kwelch
PostPosted: Mon Mar 31, 2003 1:21 pm    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi twegmann,

Do you have a way of knowing when you are processing your last message?
How is your Messageflow set up currently? Are you using Propogate?
I guess I have more questions than answers.

Karen
Back to top
View user's profile Send private message Send e-mail
twegmann
PostPosted: Tue Apr 01, 2003 7:33 am    Post subject: Reply with quote

Novice

Joined: 09 Aug 2001
Posts: 23
Location: New Jersey

Yes, I can recognize the last message because it is a 'footer' msg that gets sent once all the real data messages have been posted. What I really want to do is to send this 'footer' message to each of the three output queues, but modify it first to contain the specific count of the messages placed on that particular output queue.

So far, design is series of nested filter nodes that are directing the messages to the correct output queues. The first filter checks to see if it the 'footer' msg, if it is not, it passes the msg to nested filters checking the message content to determine the output queue it goes to.

If it is the footer msg, i want to modify it to contain count for first output queue and put a message there (1st q), then modify it to contain the count for the second queue and put a message there (2nd q), and then modify it to contain the count for third queue and put a message there (3rd q).
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 01, 2003 8:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You'll need to use a database to store the different counts, as there's no other state that is persistant across messages.

You're better off switching to a RouteToLabel architecture, performance wise, than using more than about two layers of nested Filter nodes.
Back to top
View user's profile Send private message
kwelch
PostPosted: Tue Apr 01, 2003 12:08 pm    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi,

If you have messages coming in that may need to go to 1, 2, or 3 queues based on the content of the message, you might be able to use PROPOGATE and store your counters in the Environment.Variables. You could use DestinationList to assign which queues to go to. I haven't tried this though.

Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Apr 01, 2003 12:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The Environment tree is scoped only to the current execution thread of the message flow for the particular input message. Each new message that arrives on the input node gets it's own (empty) copy of Environment.

So if he uses propogate, and stores a counter in Environment, it will only ever get incremented to the total number of messages that get propogated out of one input message, in this case 3.
Back to top
View user's profile Send private message
kwelch
PostPosted: Tue Apr 01, 2003 12:50 pm    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

oh yeah! Good point! I was forgetting part of the problem. What was I thinking??????? Then I guess storing the 3 counters to some external source is the option. If he used a database wouldn't he have to keep updating the same row every time with the new values of the 3 counters?

Karen
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Apr 01, 2003 2:44 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

He would have to keep doing an update of the same row to increment his counters.

However, he doesn't have to do anything special to access the database. If he wanted to maintain state in some other manner, he would have to create a custom plug-in of some sort or other.

Well. I suppose he could always put out the counters to a queue instead of a database. But then the newest value for the counters is the last message on the queue.

A database is the easiest solution. It may not be the best performance wise, an extremely simple java or c node may run faster. But it's less work to use the db.
Back to top
View user's profile Send private message
Lisa
PostPosted: Wed Apr 02, 2003 8:30 am    Post subject: Support Pac Reply with quote

Master

Joined: 07 Jun 2002
Posts: 287
Location: NJ

Hi,
Take a look at support pac IA79: MQSeries Integrator - DxPool Plug-In

You may be able to use this.

website:

http://www-3.ibm.com/software/integration/support/supportpacs/product.html#wmqi

Lisa
Back to top
View user's profile Send private message Send e-mail
yaakovd
PostPosted: Wed Apr 02, 2003 10:54 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

We use DB2 table in similar case and UpdateDB node.

It is very fast and effective...
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
nganeshp
PostPosted: Wed Sep 29, 2004 6:12 am    Post subject: Reply with quote

Novice

Joined: 17 Sep 2004
Posts: 18

Hi

I was using DxPool in MQSI V2.1 and it was working great. But now i am migrating to WBIMB V5.0 but DxPool is not supported in V5.0. Please advise me whether there is any plug-in nodes or any solution in V5.0 which can replace DxPool.

Thanks
Ganesh
_________________
Hi
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Wed Sep 29, 2004 6:24 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Take a look at the supportpac: IA91 Broker Domain Data Store
Back to top
View user's profile Send private message
nganeshp
PostPosted: Wed Sep 29, 2004 11:14 am    Post subject: Reply with quote

Novice

Joined: 17 Sep 2004
Posts: 18

Hi,

Thanks for the immediate reply. I am working on it. Thanks for your suggestion.

Ganesh
_________________
Hi
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Wed Sep 29, 2004 5:04 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

If your data is changing very often then I'd recommend using DB, by doing this you are also taking care of fail-over/server crash.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Counting messages in MQSI
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.