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 » Which instance gets the message?

Post new topic  Reply to topic
 Which instance gets the message? « View previous topic :: View next topic » 
Author Message
jcv
PostPosted: Fri Dec 19, 2008 5:27 am    Post subject: Which instance gets the message? Reply with quote

Chevalier

Joined: 07 May 2007
Posts: 411
Location: Zagreb

Hello!

If there are two application instances both holding open queue for input in shared mode, for example two message flow instances with mqinput node pointed to the same queue, running in two execution groups, how do they compete for the message, if they are both idle when message arrives? If I put a bunch of messages at the same time on the queue, they are equally distributed because each flow becomes busy processing the message it gets, leaving the other to get one, but if I put them less frequently, I see that one instance gets them all. Where is this priority set?
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Fri Dec 19, 2008 5:35 am    Post subject: Re: Which instance gets the message? Reply with quote

Grand High Poobah

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

jcv wrote:
Where is this priority set?


IIRC (and this has been discussed in here somewhere but it's too late on a Friday to look for it) it's not a priority setting per se; it's the MQGET call that's been waiting the shortest period of time which gets the message delivered. Hence if you've got 2 threads and new messages being delivered only after the previous has been processed and a new wait started, the same instance gets the message.

Supposed to improve throughput by ensuring the "running" or "paged in" thread always gets the next message.

I'm prepared to be corrected on any of this. Like I said, the question has been discussed.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 19, 2008 5:40 am    Post subject: Reply with quote

Grand High Poobah

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

This is of course entirely separate to the question of queue option setting like Priority, grouping, delivery sequence and so forth. The queue manager will use these first to determine which is the next message to be delivered. Including of course if the message is committed or uncommitted.

It will then deliver this message to a waiting MQGET (which could be a broker instance or an application).

Just thought I should underline that to prevent any possible misunderstandings.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jcv
PostPosted: Fri Dec 19, 2008 6:01 am    Post subject: Reply with quote

Chevalier

Joined: 07 May 2007
Posts: 411
Location: Zagreb

Well, I guess you won't be corrected on any of this, at least not by me. Thanks.
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Fri Dec 19, 2008 6:18 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Which instance gets the message?
This is a great technical quesiton. The answer is: it is the instance that is most available.

This is not necessarily an MQ issue. Think of a file. If two applicaitons are trying to read the file concurrently, which will finish reading read it first? Same answer. This is true for FTP, TCP, and pretty much any two applications competing for resources.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jcv
PostPosted: Fri Dec 19, 2008 7:07 am    Post subject: Reply with quote

Chevalier

Joined: 07 May 2007
Posts: 411
Location: Zagreb

O.K. I was just worried about missing somewhere some setting when deploying message flows, or creating execution groups. And then I decided to formulate it as a general MQ question, and post it here, probably wrong.
There is a linked question about implementing round robin for http requests in a message flow which acts as web service client receiving input from MQInput node, issuing requests to two WAS servers, trying to spread (or spray?) the load. I thought that deploying two instances with parameters "Web service URL" of the http request node fixed to each of these servers in two separate execution groups might be a workaround. But it clearly isn't because of the fact explained by Vitor. Another idea was to change the design of the flow, so that http request node parameter is dynamicly changed (altered) based on the history of the prevoius execution, and the history would be saved in a form of message in a queue, requiring an additional MQGet node (and output to that queue). Solution which will take place in the end, and it will be much more sophisticated, will be an external load balancer, CISCO content switch. Or is there any other idea? Again, I'm not sure if this is the appropriate forum for this new question.
Back to top
View user's profile Send private message Visit poster's website
jcv
PostPosted: Fri Dec 19, 2008 7:18 am    Post subject: Reply with quote

Chevalier

Joined: 07 May 2007
Posts: 411
Location: Zagreb

Another idea is to have two broker nodes and rely on mq cluster load balancing. In that case, flows on one node should be deployed to target one web service WAS, and on another, another.
Back to top
View user's profile Send private message Visit poster's website
jcv
PostPosted: Mon Dec 22, 2008 11:03 am    Post subject: Reply with quote

Chevalier

Joined: 07 May 2007
Posts: 411
Location: Zagreb

Actually, load balance is achieved by that workaround whenever there is a little bit heavier load.
Having 2 broker nodes is neccessary for HA reasons, and actually both of them should be able to issue requests to both WAS servers.
Thinking about qmgr cluster workload balancing, reminds me of the fact that there is a possibility to use Web Service over MQ, which we never seriously considered. Probably that's better way to achieve load balance instead of load balancing http requests, and probably there is a lot of other advantages if there is a choice to use MQ instead of http?
Is there a tree placeholder for an environment variable whose scope exceeds single flow execution?
Moderators, please move this thread to WMBI forum.


Last edited by jcv on Wed Jan 07, 2009 3:39 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Mon Dec 22, 2008 2:33 pm    Post subject: Reply with quote

Grand High Poobah

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

jcv wrote:

Moderators, please move this thread to WMBI forum.

Done
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Which instance gets the message?
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.