Author |
Message
|
ravi21588 |
Posted: Fri May 27, 2016 4:26 am Post subject: Multiple Consumer for an IBM MQ not working as expected |
|
|
Newbie
Joined: 27 May 2016 Posts: 5
|
Hi All,
Iam trying to connect to IBM MQ from a switchyard application deployed in two different Jboss Containers.i can see the Open Input count as 2 in the MQ.But when i place the message in IBM MQ only one of the application which has first established connection is picking the message and the other is not.
Iam Expecting the both the applications to process the message round robin basis for load balancing. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 27, 2016 4:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
How have you configured your QCF's ?
How are you opening your Q objects? (what settings on qcf.open) _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
vennela |
Posted: Fri May 27, 2016 5:14 am Post subject: Re: Multiple Consumer for an IBM MQ not working as expected |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
ravi21588 wrote: |
.But when i place the message in IBM MQ only one of the application which has first established connection is picking the message and the other is not. |
Your observation is wrong
Try to put 100 messages in a short period of time, preferably using a tool
Then both the JBoss servers will get messages
ravi21588 wrote: |
Expecting the both the applications to process the message round robin basis for load balancing. |
Wrong
Because you are not telling anywhere in your JBoss server (I am guessing -- because I have never used JBoss, but with WAS experience) that the algorithm is Round Robin
Both the servers will try to get messages and whichever picks them, that server will process it
So, if you put 100 messages, one might get 55 and the other 45
Something like that
mqjeff wrote: |
How have you configured your QCF's ?
How are you opening your Q objects? (what settings on qcf.open) |
Jeff
Does it matter? |
|
Back to top |
|
 |
zpat |
Posted: Fri May 27, 2016 6:16 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
There is one possibility - the first connection has an exclusive open.
Otherwise multiple listeners on queues don't have any load-balancing as such, they will each get a message when MQ makes one available to their handle (which must be performing an active MQGET).
So it depends how quickly each application performs another MQGET, whether it uses MQGMO_WAIT or not.
One would expect servers of the same capacity and using an identical application to process a similar number of messages but there is no assurance of this (AFAIK). _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
vennela |
Posted: Fri May 27, 2016 6:25 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
zpat wrote: |
There is one possibility - the first connection has an exclusive open.
|
Agree
Since the OP said he could see two connections, I assumed one connection from each server is established and no exclusiveness is in play |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 27, 2016 8:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well it's not round robin... It is really first come, first serve...
So if there are not enough messages on the queue, the same app server can get them all...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
markt |
Posted: Sat May 28, 2016 1:41 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
|
Back to top |
|
 |
vennela |
Posted: Mon May 30, 2016 5:59 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
|
Back to top |
|
 |
|