|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Pause/Resume Message processing by MDBs |
« View previous topic :: View next topic » |
Author |
Message
|
hash |
Posted: Tue Mar 17, 2009 12:15 pm Post subject: Pause/Resume Message processing by MDBs |
|
|
Newbie
Joined: 17 Mar 2009 Posts: 2
|
Hi,
I have a requirement where one of my MDB needs to be stopped temporarily, such that messages arriving at its queue are not processed. However, after a certain period of time the MDB should pick up the messages and process them. The stopping and starting needs to be done programatically.
There are some articles in the internet which show how Listener Ports can be stopped and started using JMX. I tried them out and was able to start stop Listenerports programatically. However, the problem is, after the LP has been started, the MDB does not consume the messages sitting in the queue.
What can be wrong? I am using WAS 5.1 and the LP setting is -
Maximum sessions = 1
Maximum retries = 0
Maximum messages = 1
Our MDBs are designed to never throw exceptions to the JMS provider. In case of an error, the messages are moved to a Backout queue. So in other words, from a JMS provider point of view, messages are always consumed successfully.
Any help would be greatly appreciated.
Thanks |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Mar 17, 2009 3:45 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Get Disable the queue when you want to stop consumption, Get Enable when its time to eat. Easy to script.
Perhaps there is a way to accomplish what you want from the MDB side. This is a way to do it from the MQ side. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
hash |
Posted: Tue Mar 17, 2009 5:42 pm Post subject: |
|
|
Newbie
Joined: 17 Mar 2009 Posts: 2
|
Guys,
I am sorry for my post. Actually, this strategy that I have mentioned works just fine. When the LP is started, the MDB picks up the message.
Peter, the strategy of Get Disabling queues work as well, however there might be some problems with it. When you Get Disable a queue, the MDB will try to access the queue and get an exception (I think). Eventually after a certain number of tries, the MDB will die and the listener port will stop. So we would still have to start the listener port using JMX API, since we would not want to do it manually.
Thanks. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Mar 18, 2009 7:57 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
We do this every night for one app for 8 hours, for what its worth. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
sandy2000 |
Posted: Wed Mar 18, 2009 9:17 pm Post subject: |
|
|
Newbie
Joined: 18 Mar 2009 Posts: 4
|
Could you please send how to stop listner port within MDB programtically ?
is it a part of MDB code ? I'm sorry I did not understand how you are managing to stop the listener port programatically.
Thank you . |
|
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
|
|
|
|