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 » Experts...Need help on JCN for Best Design approach

Post new topic  Reply to topic
 Experts...Need help on JCN for Best Design approach « View previous topic :: View next topic » 
Author Message
Ravin
PostPosted: Thu Sep 06, 2012 8:48 pm    Post subject: Experts...Need help on JCN for Best Design approach Reply with quote

Novice

Joined: 18 Nov 2010
Posts: 11

Hi Everyone,

I have a requirement where I need to process say 5 messages at a time. So, I used a compute node to get the 5 messages from the input queue, store in database and retrieve all the 5 messages once the threshold 5 is reached.
Now, I store these 5 messages in the environment variable as..
Environment.msgData.payLoad(i)
I pass this to the JCN, where I have a java code to process all the messages at a time.
My question here is, if there are 500-700 messages to be processed at a time is it a best approach to store messages in the environment variable or do I need to construct an xml message to pass to JCN? Which approach would yield better performance..pls. suggest.
Thanks.
Back to top
View user's profile Send private message Send e-mail
marko.pitkanen
PostPosted: Fri Sep 07, 2012 1:05 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi Ravin,

Not your direct question but have you considered use other perhaps built-in functions to implement message collections?

--
Marko
Back to top
View user's profile Send private message Visit poster's website
Ravin
PostPosted: Fri Sep 07, 2012 1:39 am    Post subject: Reply with quote

Novice

Joined: 18 Nov 2010
Posts: 11

Hi Marko,
Thanks for the response!
I initially used the collector node, but was later advised to use ESQL code rather than the collector node.
Other than this I am not aware of built-in functions for message collection.

Just to clarify my question/requirement:
1) Take message from input queue one-by-one, store in database until a threshold is reached(threshold value is set in DB)
2) Once the threshold is reached, pull message from DB store in environment variable as an array of messages
3) Pass this environment variable to Java Compute Node (which has the necessary java files to process all the messages at the same time)
All I want to know is, if this is the best approach for the above scenario.
Thanks.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Sep 07, 2012 2:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Probably not. The real question is why do you need to process 5 messages at a time. I cannot imagine that those would be 5 random messages pulled off the message stream, but rather that you are hitting some kind of message affinity.

The easiest part would be to send the content of all 5 messages in a single message. This can and should be handled outside of the broker, by the sending app.
If this is a means of making a discrete application do the right thing, have a DB collect the messages until they are ready for processing, then process the 5 msgs that go together as a single message.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Sep 07, 2012 4:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
If this is a means of making a discrete application do the right thing, have a DB collect the messages until they are ready for processing, then process the 5 msgs that go together as a single message


Which is exactly what has been said is being done.

I'd question the source of the recommendation to NOT use Collector node.

I'd reexamine the messages to see if they can be turned into message segments or groups, or otherwise see if there is any way they can be treated as "the same" message.

Processing 5 messages as a set is one thing, processing 5000 messages as a set is something else!
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Sep 07, 2012 5:45 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
I'd question the source of the recommendation to NOT use Collector node.




I'd certainly want to know the justification for such a recommendation.

mqjeff wrote:
I'd reexamine the messages to see if they can be turned into message segments or groups, or otherwise see if there is any way they can be treated as "the same" message.


Given that the threshold / group size is stored as a parameter in the database it sounds a lot like this is some kind of arbitrary batch processing limit rather than something which actually links the messages.

Which begs the question why group the messages? Why not pass them one at a time to the Java? What's the requirement for this grouping?

mqjeff wrote:
Processing 5 messages as a set is one thing, processing 5000 messages as a set is something else!



_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Experts...Need help on JCN for Best Design approach
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.