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 » Two listeners in a single queue

Post new topic  Reply to topic
 Two listeners in a single queue « View previous topic :: View next topic » 
Author Message
dilep
PostPosted: Tue Oct 26, 2010 7:50 pm    Post subject: Two listeners in a single queue Reply with quote

Apprentice

Joined: 27 Nov 2006
Posts: 40

Hi,
Is two listeners (different Websphere Java application, putting message by one application getting message by another application) is possible to a single queue.

Thanks & Regards
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Oct 26, 2010 10:03 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Yes, you can have as many putters and getters running at the same time as you want (within reason) - all using the same queue (or set of queues).

MQ is transactionally safe for concurrent access.
Back to top
View user's profile Send private message
aditya.aggarwal
PostPosted: Wed Oct 27, 2010 6:16 am    Post subject: Reply with quote

Master

Joined: 13 Jan 2009
Posts: 252

Quote:
Yes, you can have as many putters and getters running at the same time as you want (within reason) - all using the same queue (or set of queues).

MQ is transactionally safe for concurrent access.



but if it is One Put application and Two get applications then Application code need to modified for issuing correct get call for correct message..
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 27, 2010 6:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

aditya.aggarwal wrote:
but if it is One Put application and Two get applications then Application code need to modified for issuing correct get call for correct message..


Unless the get application doesn't care which message it gets, and there are n get applications solely because the put application processes n times faster than the get.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aditya.aggarwal
PostPosted: Wed Oct 27, 2010 6:43 am    Post subject: Reply with quote

Master

Joined: 13 Jan 2009
Posts: 252

Quote:
Unless the get application doesn't care which message it gets, and there are n get applications solely because the put application processes n times faster than the get.

Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Fri Oct 29, 2010 7:31 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

Vitor wrote:
aditya.aggarwal wrote:
but if it is One Put application and Two get applications then Application code need to modified for issuing correct get call for correct message..


Unless the get application doesn't care which message it gets...


dilep: Hope you understand this point !
The get applications have such criteria that they can identify what they should get and what they should reject ? (Only if they are concerned about it)
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Fri Dec 10, 2010 3:43 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

If you want messages processed differently in some way use two queues.

If you want messages processed in the same way but in parallel use one queue and two (or more) getters. Each getter simply takes the next available message.

It's not just about matching put and get speed. It might be used for reasons of latency, and most importantly resilience - since if one getter fails then the other(s) can just carry on.

Using get with syncpoint will even protect a message against failure during processing by one getter and return it to the queue so that another getter can deal with it.

All in all a very useful, flexible and scaleable option to use.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Dec 10, 2010 5:45 am    Post subject: Reply with quote

Poobah

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

another caveat: if individual messages are related to each other (message affinity), then one of the multiple concurrent getters might consume a message belonging to another getter.
_________________
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
zpat
PostPosted: Fri Dec 10, 2010 7:15 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

In that case message grouping could be used, but the model is more suitable to atomic transactions at higher volumes.

You can't guarentee to have a single getter unless the queue is set to open with input exclusive rather than shared.
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 » Two listeners in a single 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.