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 » Clustering » Message Affinities

Post new topic  Reply to topic
 Message Affinities « View previous topic :: View next topic » 
Author Message
phani_16
PostPosted: Thu Mar 10, 2011 5:46 am    Post subject: Message Affinities Reply with quote

Novice

Joined: 09 Mar 2011
Posts: 20

Hi,

I'm new to MQ and would like to implement/test the message affinity from MQI program in MQ clusters.

How do we actually achieve message affinities using MQI in clusters ? Is this achieved by grouping all the messages at once ?

If not,then for every MQOPEN and MQPUT call to a queue for a message,any same instance of the queue can be selected from the queue.

Do we have any sample MQI program for the same ? Please help me in this regard.

Thanks in advance.
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Mar 10, 2011 6:00 am    Post subject: Re: Message Affinities Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

phani_16 wrote:
How do we actually achieve message affinities using MQI in clusters ?

I would use bind-on-open. Please search for this and reply if anything is still uncertain.

Actually it would be a good idea to read the whole Queue Manager Clusters manual, to get a good background understanding.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 10, 2011 6:03 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Message affinity is bad.

You should design away from it.

When you open a QCLUSTER, you can choose what kind of BIND options you choose.

If, somehow, you have an incredibly specific and tight business requirement that absolutely requires that a set of messages is processed in order, then you should design this into the application that is processing the messages. Because it is a business requirement, and should therefore be handled at the application level rather than the transport level.
Back to top
View user's profile Send private message
phani_16
PostPosted: Thu Mar 10, 2011 6:13 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2011
Posts: 20

Thanks very much for the prompt response.

I have read the queue managers cluster manual and its suggested that the best solution would be to define the default binding on the Queue to OPEN ( DEFBIND(OPEN) ) and then use BIND_AS_Q_DEF in the application.

If we use the BIND_ON_OPEN,then seems that multi-hop configuration is not best supported. ( Creating an ALIAS queue in the Queue manager ).
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Mar 10, 2011 6:24 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

phani_16 wrote:
...it's suggested that the best solution would be to define the default binding on the Queue to OPEN ( DEFBIND(OPEN) ) and then use BIND_AS_Q_DEF in the application...


That is not the best method in my opinion, because it means no load balancing for those queues by other applications which have no affinity requirements. It is better to leave the queues as DEFBIND(NOTFIXED) and have the application specify BIND_ON_OPEN.

phani_16 wrote:
...If we use the BIND_ON_OPEN,then seems that multi-hop configuration is not best supported. ( Creating an ALIAS queue in the Queue manager )...


I think you're getting a little confused here between multi-hopping using 'vanilla' point-to-point (SDR/RCVR) channels, and load-balancing across a cluster.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
phani_16
PostPosted: Thu Mar 10, 2011 6:41 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2011
Posts: 20

If this is the case,then if i want to send first 5 messages to one instance of a queue in a cluster to one queue manager and then the next 5 messages to another queue manager, do we have to use to use grouping for these two sets of messages ?

or do we have to use cluster work load management attributes for queues,channels etc ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 10, 2011 6:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

exerk wrote:
phani_16 wrote:
...it's suggested that the best solution would be to define the default binding on the Queue to OPEN ( DEFBIND(OPEN) ) and then use BIND_AS_Q_DEF in the application...


That is not the best method in my opinion, because it means no load balancing for those queues by other applications which have no affinity requirements. It is better to leave the queues as DEFBIND(NOTFIXED) and have the application specify BIND_ON_OPEN.


It's better to have all applications completely ignore DEFBIND.

exerk wrote:
phani_16 wrote:
...If we use the BIND_ON_OPEN,then seems that multi-hop configuration is not best supported. ( Creating an ALIAS queue in the Queue manager )...


I think you're getting a little confused here between multi-hopping using 'vanilla' point-to-point (SDR/RCVR) channels, and load-balancing across a cluster.


It is technically possible to configure multi-hopping with clustering. But not usually with just one cluster.

Within a cluster, all traffic is point to point from sending app to receiving app, unless you take a lot of effort with qaliases and qremotes to make it go the long way around.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 10, 2011 1:19 pm    Post subject: Reply with quote

Grand High Poobah

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

phani_16 wrote:
If this is the case,then if i want to send first 5 messages to one instance of a queue in a cluster to one queue manager and then the next 5 messages to another queue manager, do we have to use to use grouping for these two sets of messages ?

or do we have to use cluster work load management attributes for queues,channels etc ?

Neither nor...
You use default bind on open for each group and you close between groups.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Thu Mar 10, 2011 1:40 pm    Post subject: Reply with quote

Poobah

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

The WMQ Cluster Queue Manager manual describes the basic round-robin method queues are selected.

At the applications first MQOPEN WITH MQOO_BIND_ON_OPEN, one instance of the cluster queue will be selected.

After your app puts 5 messages, close the queue; then MQOPEN the queue again with MQOO_BIND_ON_OPEN. The clustering software will then select the next instance of the queue; then put the next 5 messages. Repeat.
_________________
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
PeterPotkay
PostPosted: Thu Mar 10, 2011 5:01 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

bruce2359 wrote:

After your app puts 5 messages, close the queue; then MQOPEN the queue again with MQOO_BIND_ON_OPEN. The clustering software will then select the next instance of the queue; then put the next 5 messages. Repeat.


And when the cluster selects the next instance of the queue to put the next 5 messages, there is nothing preventing it from deciding that the same queue the previous 5 went to is the best choice according to the rules of the cluster workload algorithm.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Mar 10, 2011 7:18 pm    Post subject: Reply with quote

Poobah

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

True.

You can have some influence on the distribution of msgs, but
You can't force distribution of msgs with clustering software.

Read the manual for an explanation of the routing algorithm.
_________________
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
phani_16
PostPosted: Mon Mar 14, 2011 1:27 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2011
Posts: 20

Thanks all for the descriptive answers.
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 » Clustering » Message Affinities
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.