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 IndexIBM MQ Java / JMSCreating dynamic Message Listener

Post new topicReply to topic
Creating dynamic Message Listener View previous topic :: View next topic
Author Message
sabin
PostPosted: Thu Feb 02, 2017 6:06 pm Post subject: Creating dynamic Message Listener Reply with quote

Newbie

Joined: 02 Feb 2017
Posts: 2

I want to create multiple Queue listeners, but do not want to end up creating multiple Message Driven Beans each for each queue listeners. Is there other way?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Feb 03, 2017 5:08 am Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6059
Location: Somewhere over the Rainbow this side of Never-never land.

If you don't want to do that then how about using the facilities that come with MQ such as Triggering?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 03, 2017 5:50 am Post subject: Reply with quote

Grand Poobah

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

smdavies99 wrote:
If you don't want to do that then how about using the facilities that come with MQ such as Triggering?

The OP did not specify but from the word MDB (Message Driven Bean) I would expect the environment to be a J2EE server, (may be WAS?) and MQ to work off the RAR file. This would not allow for MQ triggering unless you wrote your own JMS trigger monitor..., rolled your own thread pool, etc...

Let's keep it simple, and just use the plain MDBs.

To the OP, you can reuse the same MDB class in multiple MDB definitions.
Best practice says that each different queue needs an MDB definition. However some or all of the MDBs can share the same processing class.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sabin
PostPosted: Fri Feb 03, 2017 5:59 am Post subject: Reply with quote

Newbie

Joined: 02 Feb 2017
Posts: 2

Thank you. And yes , I want to run the EAR project in Websphere Server. I want to be able to create queue listeners by reading the configuration for the queues. Today I have three MDB listening on three queues, but tomorrow, if I will have to listen to additional queue/s then I would want to just add the change in the configuration instead of creating a whole new MDB Bean.
Thank You very much.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 03, 2017 6:08 am Post subject: Reply with quote

Grand Poobah

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

sabin wrote:
Thank you. And yes , I want to run the EAR project in Websphere Server. I want to be able to create queue listeners by reading the configuration for the queues. Today I have three MDB listening on three queues, but tomorrow, if I will have to listen to additional queue/s then I would want to just add the change in the configuration instead of creating a whole new MDB Bean.
Thank You very much.

Again, best practice says that the MDB definition is part of the EAR deployment descriptor...
If the messages are the same, maybe you'd want to create alias queues instead of local ones and point the alias to the corresponding processing queue. So all you would need is to add additional instances of the MDB (see max instance field of the MDB definition) to be able to carry the load?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSCreating dynamic Message Listener
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.