Reputation: 471
Can we pause the MDB message processing for some time? For example: Jboss 1-deployed MDB for message processing. Jboss 2:-Bean for gathering user details. If the MDB from jboss 1 calls bean in jboss 2 for getting users details. If this is the case, when we restart the Jboss 2, we need to pause the MDB in jboss 1 till the jboss 2 is UP. Is there any option to pause MDB, so that we can avoid failure of message?
Upvotes: 1
Views: 2971
Reputation: 5383
You can stop the Queue on HornetQ. (I'm not sure about JBoss Messaging, but I'm pretty sure you do)
Look for the message pause and resume on the JMX Console
Upvotes: 0
Reputation: 5236
In JBoss (4.x and 5.x), you can look up the MDB through the JMX Console and pause delivery of messages.
http://yourserver:8080/jmx-console/
where 8080 is the HTTP port)jboss.j2ee
in the left-hand paneIn the right-hand pane, find and click on your MDB. Usually, it will look something like
jar=file-containing-your-MDB.jar,name=NameOfYourMDB,service=EJB3
Upvotes: 2
Reputation: 10762
I doubt you can stop an MDB without stopping the whole application. It is possible with Spring JMS, but not with regular message driven beans.
What you could do, and is apparently possible, is pausing a queue. HornetMQ does give you the possibility to switch the queue to "receive only mode", though I don't know if this is available via the admin console.
Upvotes: 2