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 » General IBM MQ Support » cluster loadbalancing to multiple instances in the same QMGR

Post new topic  Reply to topic
 cluster loadbalancing to multiple instances in the same QMGR « View previous topic :: View next topic » 
Author Message
wmbwmq
PostPosted: Thu Apr 21, 2016 7:23 am    Post subject: cluster loadbalancing to multiple instances in the same QMGR Reply with quote

Acolyte

Joined: 18 Jul 2011
Posts: 66

Pardon my ignorance here
Is there anyway to cluster load balance incoming messages between 2 queues in the same QMGR? I have 2 qmgrs in a cluster, one qmgr needs to host 2 instances of a queue(ex: BLAH1 and BLAH2 ). The other one will have just one instance(BLAH). I know it was not possible but not sure if in the latest version we can do some workaround? Example by hijacking pub/sub features etc byedirecting an alias BLAH in QMGR1 to split between BLAH1 and BLAH2.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 21, 2016 7:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pub/sub doesn't load balance.

You will get every message in both queues.

Is there really some particular reason you need two queues?

Two applications can happily read from the same queue at once, and they will get messages as fast as they are available and can be processed.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Thu Apr 21, 2016 7:33 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Would you like to say a little about why you'd like to do this ?

Generally speaking I would have thought you'd be better off directing everything to a single queue but having multiple applications reading from that queue. Then you get automatic workload balancing for free. The next application ready to take a message will automatically get it just by going back to the MQGET call.

Other advantages include:

  • You get greater efficiencies since MQ will try to keep one thread 'hot' rather that maximising the context switching as in your case.

  • You can add more applications as needed if two are not enough to keep up with workload

  • Administration is simpler since you have less queue definitions/backup points, less queues to monitor etc

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
wmbwmq
PostPosted: Thu Apr 21, 2016 7:34 am    Post subject: Reply with quote

Acolyte

Joined: 18 Jul 2011
Posts: 66

Thanks Jeff.
For various reasons it was decided to separate 2 instances of the applications at MQ level by having 2 queues.

The app is legacy , single threaded with known restrictions. (This will be temporary setup and we are in the process of replacing it with Java)
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 21, 2016 7:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Use two queue aliases that point to the same queue.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
wmbwmq
PostPosted: Thu Apr 21, 2016 7:42 am    Post subject: Reply with quote

Acolyte

Joined: 18 Jul 2011
Posts: 66

Thanks Paul and Jeff
alias thing wont work in our case as we need physical separation of queues.
So, the only option is to write a cluster workload exit? I am actually leaning more towards creating a new QMGR
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 21, 2016 7:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

wmbwmq wrote:
alias thing wont work in our case as we need physical separation of queues

Why?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
wmbwmq
PostPosted: Thu Apr 21, 2016 7:57 am    Post subject: Reply with quote

Acolyte

Joined: 18 Jul 2011
Posts: 66

the queue to which app1 connects need to be physically separate from the one to which app2 connects (in the same QMGR).

The thing is whenever both apps connected to the same local queue, we occasionally see issues , probably syncpoint related conflicts.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 21, 2016 8:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

wmbwmq wrote:
the queue to which app1 connects need to be physically separate from the one to which app2 connects (in the same QMGR).

The thing is whenever both apps connected to the same local queue, we occasionally see issues , probably syncpoint related conflicts.


You shouldn't have syncpoint issues between two handles on the same queue. That's a very odd thing.

If you wanted to take the performance hit, you might be able to create some kind of qalias or qremote or I forget what that is shared in the cluster, lives on another queue manager, and points back to the second queue in the first queue manager.

Then half your messages would go over to the second qmgr and then come back. But you would split messages across two queues.
_________________
chmod -R ugo-wx /
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 » General IBM MQ Support » cluster loadbalancing to multiple instances in the same QMGR
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.