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 IndexGeneral IBM MQ SupportPubSub - Load balancing to cluster local queues from sub

Post new topicReply to topic
PubSub - Load balancing to cluster local queues from sub View previous topic :: View next topic
Author Message
vsathyan
PostPosted: Thu May 19, 2016 7:11 am Post subject: PubSub - Load balancing to cluster local queues from sub Reply with quote

Centurion

Joined: 10 Mar 2014
Posts: 121

Hello sirs,

I want to setup a pub/sub message flow from a source application - which posts messages to an alias queue in source queue manager (1).
This source alias queue points to a clustered topic present in pub/sub queue manager (2).

The topic has 2 subscribers and each subscriber's dest attribute is a cluster local queue (2 instances for each subscription) in queue manager 3 and 4.

Attached is the diagram of the expected message flow.
https://drive.google.com/open?id=0B1JTw4P2eb9hdl9FLTQwRkhLUGM

However, the behaviour is a little different and the messages are flowing as shown in the below image.
https://drive.google.com/open?id=0B1JTw4P2eb9hYVBHUWlfNzJvdG8

What am i doing wrong? How do i get load balancing when messages are being pushed to cluster queues from subscriptions.

However, if i remove one of the subscriber (either sub1 or sub2) in the pub/sub queue manager, then the load balancing works on the other subscriber.

1. Is this the way it is designed to work or is it a bug?
2. What would be the best way to get the message flow as expected and shown in the expected message flow diagram?

Thank you in advance for your time and inputs.

Regards,
vsathyan
_________________
Custom WebSphere MQ Tools Development C# & Java
WebSphere MQ Solution Architect Since 2011
WebSphere MQ Admin Since 2004
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 19, 2016 7:44 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

First thing to remember is that DEFBIND is the *default*.

So make sure the sending application isn't setting BIND_ON_OPEN...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
vsathyan
PostPosted: Thu May 19, 2016 7:48 am Post subject: Reply with quote

Centurion

Joined: 10 Mar 2014
Posts: 121

mqjeff wrote:
First thing to remember is that DEFBIND is the *default*.

So make sure the sending application isn't setting BIND_ON_OPEN...


Hi Jeff, Thanks for the response. However, as updated in my original post.

However, if i remove one of the subscriber (either sub1 or sub2) in the pub/sub queue manager, then the load balancing works on the other subscriber.

When i put back the removed subscription in place, the load balancing stops.

_________________
Custom WebSphere MQ Tools Development C# & Java
WebSphere MQ Solution Architect Since 2011
WebSphere MQ Admin Since 2004
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 19, 2016 8:02 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What happens if you change the subscription objects to use the topic object, instead of the topic string directly?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
vsathyan
PostPosted: Thu May 19, 2016 8:20 am Post subject: Reply with quote

Centurion

Joined: 10 Mar 2014
Posts: 121

Same result. Messages are not load balancing when i changed the subscription to use topic object instead of topic string.

Note : I removed and re-created all the objects (did not just alter, i mean because i've faced problems and pub/sub doesnt work sometimes just by altering attributes of topics/subs - especially the pubscope, and subscope attributes).

Regards,
vsathyan
_________________
Custom WebSphere MQ Tools Development C# & Java
WebSphere MQ Solution Architect Since 2011
WebSphere MQ Admin Since 2004
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 19, 2016 8:24 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Well. That kinda seems like PMR time to me.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
hughson
PostPosted: Thu May 19, 2016 1:41 pm Post subject: Reply with quote

Grand Master

Joined: 09 May 2013
Posts: 1007
Location: Bay of Plenty, New Zealand

Cluster workload balancing is done by round robining per queue manager. Each queue manager is getting the same number of message and so this is actually working correctly.

If all four cluster queues were on separate queue managers you'd seen 50 each, or if you had two clusters then I believe you'd also see 50 each.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
vsathyan
PostPosted: Thu May 19, 2016 5:47 pm Post subject: Reply with quote

Centurion

Joined: 10 Mar 2014
Posts: 121

Hello Morag,
Thanks for your reponse.

Even i got the same thought after thinking for some time. However, the below are my further observations.

1. If i push messages directly to the cluster local queues from a different queue manager in the cluster (qmgr 5), messages are load balanced as expected in each cluster queue.

2. If i point each of the subscription in the pubsub queue manager to a locally defined non-clustered alias queue, and then point the alias to the cluster queues, and then i push a message to the topic, the messages DO NOT get on equally on 4 queues. They get distributed only on 1 cluster queue in each queue manager.

3. If i push a message to the above locally defined alias queue in the pub sub queue manager - messages are load balanced.

4. In fact, i have another flow in the same route, with another topic and a single subscription which points to a third pair of cluster queues - 1 in qmgr 3 and 1 in qmgr 4. When i publish messages to this second topic, messages are load balanced properly between the third cluster queue pair. If the load balancing was per qmgr, then this should not have worked.

Any comments or advise? Thank again, in advance.

Regards,
vsathyan
_________________
Custom WebSphere MQ Tools Development C# & Java
WebSphere MQ Solution Architect Since 2011
WebSphere MQ Admin Since 2004
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 20, 2016 2:43 am Post subject: Reply with quote

Grand Poobah

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

Depends on the DEFBIND of your alias / remote queues. I usually define a cluster alias with DEFBIND(NOT Fixed) to receive the subscribed messages. That does it for me...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vsathyan
PostPosted: Fri May 20, 2016 6:08 am Post subject: Reply with quote

Centurion

Joined: 10 Mar 2014
Posts: 121

hello fjb_saper,

Right, we do have DEFBIND set to NOTFIXED (shown in the diagrams in the first post of this thread).
I've also tried creating a locally defined alias queue in between the SUB and the cluster queue, as below

SUBSCRIPTION 1 -> ALIAS QUEUE 1 -> CLUSTER QUEUE 1
SUBSCRIPTION 2 -> ALIAS QUEUE 2 -> CLUSTER QUEUE 2

ALIAS QUEUE 1 and ALIAS QUEUE 2 are not part of the cluster. However, i've also set the DEFBIND(NOTFIXED) on these non-clustered alias queues.

When i put messages on the ALIAS QUEUE 1 and 2 directly using amqsput, the messages load balance.
However, when the messages arrive on this alias queue from the subscription, they are not load balanced.

Though this is not the context of this discussion topic, you would be surprised, if i say that setting DEFBIND(NOTFIXED) on a non-clustered alias queue actually works (yes, setting DEFBIND on a non-clustered alias queue).
Meaning, when i did not set this on the alias, load balancing did not occur. However when i set it on the non-clustered alias queue and put some messages, it started to load balance.

Wondering, how would DEFBIND come into picture when the queue is not clustered?
_________________
Custom WebSphere MQ Tools Development C# & Java
WebSphere MQ Solution Architect Since 2011
WebSphere MQ Admin Since 2004
Back to top
View user's profile Send private message
satyabvv2000
PostPosted: Tue Feb 19, 2019 3:59 am Post subject: Reply with quote

Novice

Joined: 11 Dec 2014
Posts: 10

Hi,

We are facing the same issues. I am planning to raise a PMR but before that would like to check if you would have resolved the issue
Thanks
Satya
Back to top
View user's profile Send private message
hughson
PostPosted: Wed Feb 20, 2019 12:57 am Post subject: Reply with quote

Grand Master

Joined: 09 May 2013
Posts: 1007
Location: Bay of Plenty, New Zealand

Could you detail which of the above you are facing, preferably in a new question rather than reopening a three year old one?
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportPubSub - Load balancing to cluster local queues from sub
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.