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 » IBM MQ Java / JMS » Multiple Consumer for an IBM MQ not working as expected

Post new topic  Reply to topic
 Multiple Consumer for an IBM MQ not working as expected « View previous topic :: View next topic » 
Author Message
ravi21588
PostPosted: Fri May 27, 2016 4:26 am    Post subject: Multiple Consumer for an IBM MQ not working as expected Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Fri May 27, 2016 4:41 am    Post subject: Reply with quote

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
View user's profile Send private message
vennela
PostPosted: Fri May 27, 2016 5:14 am    Post subject: Re: Multiple Consumer for an IBM MQ not working as expected Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
zpat
PostPosted: Fri May 27, 2016 6:16 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
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
View user's profile Send private message
vennela
PostPosted: Fri May 27, 2016 6:25 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
fjb_saper
PostPosted: Fri May 27, 2016 8:04 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
markt
PostPosted: Sat May 28, 2016 1:41 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 502

Quote:
It is really first come, first serve...


Actually more like last come, first serve by default. As that generally gives best performance.

See for example http://www-01.ibm.com/support/docview.wss?uid=swg1IZ85974 on how to make it more even.
Back to top
View user's profile Send private message
vennela
PostPosted: Mon May 30, 2016 5:59 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Awesome

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

MQSeries.net Forum Index » IBM MQ Java / JMS » Multiple Consumer for an IBM MQ not working as expected
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.