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 » Consumer application & multi instance cluster queue

Post new topic  Reply to topic
 Consumer application & multi instance cluster queue « View previous topic :: View next topic » 
Author Message
mgm
PostPosted: Sun Apr 25, 2010 5:26 am    Post subject: Consumer application & multi instance cluster queue Reply with quote

Apprentice

Joined: 14 Dec 2007
Posts: 48
Location: anywhere

Hi All,
We have 4 queue managers sharing one cluster with multiple instance queue. The sender application can connect to a specific queue manager and rely on load balancing algorithm to route the message across the 4 QMs.

We need to have similar approach of the consumer application, where the app connects only to one of the queue manages and get the messages from the other instances of the input queue. Any ideas ?
Back to top
View user's profile Send private message Yahoo Messenger
bruce2359
PostPosted: Sun Apr 25, 2010 5:42 am    Post subject: Reply with quote

Poobah

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

No. While MQPUTs may be to local or remote queues, all MQGETs are local. The consuming application muse be connected to the qmgr where the message resides (in a queue).
_________________
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
fjb_saper
PostPosted: Sun Apr 25, 2010 6:04 am    Post subject: Re: Consumer application & multi instance cluster queue Reply with quote

Grand High Poobah

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

mgm wrote:
Hi All,
We have 4 queue managers sharing one cluster with multiple instance queue. The sender application can connect to a specific queue manager and rely on load balancing algorithm to route the message across the 4 QMs.

We need to have similar approach of the consumer application, where the app connects only to one of the queue manages and get the messages from the other instances of the input queue. Any ideas ?

You need to look at this with different eyes.
You have multiple choices:
  1. An instance of the consumer application paired to the qmgr / queue instance where it gets its messages from (i.e. 4 consumer app instances)

  2. At least 2 instances of the consumer app (no single point of failure) connecting in client mode to all 4 qmgrs hosting the queue instances feeding the app its messages


Think about it. Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mgm
PostPosted: Sun Apr 25, 2010 6:38 am    Post subject: Reply with quote

Apprentice

Joined: 14 Dec 2007
Posts: 48
Location: anywhere

Thanks for the quick reply.
I've heard that a gateway queue manager could be used but couldn't find any proper documentation for that. Appreciate if someone let me know if it could be another option or it's something else.
Back to top
View user's profile Send private message Yahoo Messenger
bruce2359
PostPosted: Sun Apr 25, 2010 7:12 am    Post subject: Reply with quote

Poobah

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

The term gateway qmgr is usually used to indicate that a qmgr that is part of a cluster also has non-clustered point-to-point channels to a(nother) qmgr not part of the cluster.

Apps on the non-cluster qmgr wants/needs to get messages into a queue that is part of the cluster; and MQPUTs the messages to a QR definition that sends them into the cluster via the gateway qmgr.
_________________
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
mgm
PostPosted: Sun Apr 25, 2010 7:21 am    Post subject: Reply with quote

Apprentice

Joined: 14 Dec 2007
Posts: 48
Location: anywhere

bruce2359 wrote:
The term gateway qmgr is usually used to indicate that a qmgr that is part of a cluster also has non-clustered point-to-point channels to a(nother) qmgr not part of the cluster.

Apps on the non-cluster qmgr wants/needs to get messages into a queue that is part of the cluster; and MQPUTs the messages to a QR definition that sends them into the cluster via the gateway qmgr.


So how to configure a consumer app to get messages from a cluster QM through gateway QM
Back to top
View user's profile Send private message Yahoo Messenger
bruce2359
PostPosted: Sun Apr 25, 2010 7:41 am    Post subject: Reply with quote

Poobah

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

The usual request-reply model can have the requesting application on any qmgr inside our outside the cluster. If you are not familiar with the request-reply model, please refer to the APR and APG manuals.

The request-reply model presumes that the producer of the message creates a reply-to-queue (where the replying app will send its reply msg), puts the request message to the queue (local or remote) where the consuming app resides. The consumer app gets the request message, and sends a reply msg back to the producer.

Again, there is no such thing as a remote get - the consuming application must be mqconnected to the qmgr where the queue exists. If your app is an mq client, it is possible to mqconnect directly to the qmgr for both put and get, but this is not the common method.
_________________
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
sedmq
PostPosted: Thu Jun 24, 2010 5:49 am    Post subject: Re: Consumer application & multi instance cluster queue Reply with quote

Newbie

Joined: 24 Jun 2010
Posts: 2

fjb_saper wrote:

At least 2 instances of the consumer app (no single point of failure) connecting in client mode to all 4 qmgrs hosting the queue instances feeding the app its messages


I don't see how you can load-balance consumption of messages from n queue managers without either:
1.) n instances of the consumer app connected to queue managers in a 1-to-1 fashion (your other suggestion)
2.) major application changes to each consumer app so that it will maintain multiple concurrent open connections, each to a different queue manager

Were you suggesting option 2? I still don't understand why MQ will round-robin a PUT but not a GET.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jun 24, 2010 6:37 am    Post subject: Re: Consumer application & multi instance cluster queue Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

sedmq wrote:
I still don't understand why MQ will round-robin a PUT but not a GET.


Because it's not written to do that.

Because it's not necessary to do that. If you round-robin the PUT, then you have distributed work to multiple locations. Why would you possibly want to then UNDISTRIBUTE that work by reading it all from the same location?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Jun 24, 2010 6:51 am    Post subject: Reply with quote

Poobah

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

Quote:
I still don't understand why MQ will round-robin a PUT but not a GET.

Consuming applications MQCONNect to a qmgr, then MQOPEN a queue, then MQGET (with WAIT, usually) - whether there is a message to consume or not.

If you want to have the consumer app to come to life when a message arrives (and wherever it arrives, then you need to look at triggering the queue.
_________________
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
sedmq
PostPosted: Thu Jun 24, 2010 7:44 am    Post subject: Re: Consumer application & multi instance cluster queue Reply with quote

Newbie

Joined: 24 Jun 2010
Posts: 2

mqjeff wrote:
Why would you possibly want to then UNDISTRIBUTE that work by reading it all from the same location?


I need persistence for my messages, and my producers and consumers are much faster at handling messages than a single queue manager.

In general, it would be nice to have an application stack (likely HA) which talks to many queue managers, the number of which depends solely on the performance I need from MQ. Does every developer who runs into a performance problem with persisted messages then deploy many instances of the application in addition to many queue managers?

Maybe I misunderstand the point of load balancing with MQ - is it really for spreading application load rather than messaging load?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Jun 24, 2010 8:09 am    Post subject: Reply with quote

Poobah

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

Quote:
Does every developer who runs into a performance problem with persisted messages then deploy many instances of the application in addition to many queue managers?

Cluster queues allow spreading of the workload to many consumers. So, yes, this is a method of dealing with performance bottlenecks.

Quote:
Maybe I misunderstand the point of load balancing with MQ - is it really for spreading application load rather than messaging load?

It does both at the same time.
_________________
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
gbaddeley
PostPosted: Thu Jun 24, 2010 4:01 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Quote:
Does every developer who runs into a performance problem with persisted messages then deploy many instances of the application in addition to many queue managers?


No, but multiple app instances and qmgrs is a valid technique for achieving scalability and improved availability.

MQ performance is not usually a bottleneck. I find that 99% of performance problems are due to poor application design and inappropriate usage of MQ. Maybe you need to take a closer look at MQ.
_________________
Glenn
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 » Consumer application & multi instance cluster queue
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.