|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Creating dynamic Message Listener |
« View previous topic :: View next topic » |
Author |
Message
|
sabin |
Posted: Thu Feb 02, 2017 6:06 pm Post subject: Creating dynamic Message Listener |
|
|
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 |
|
 |
smdavies99 |
Posted: Fri Feb 03, 2017 5:08 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 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 |
|
 |
fjb_saper |
Posted: Fri Feb 03, 2017 5:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
sabin |
Posted: Fri Feb 03, 2017 5:59 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri Feb 03, 2017 6:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|