When JBoss 5.1.0 server is shutdown and restarted, new messages in a server queue
(org.jboss.mq.server.jmx.Queue) are not processed by the QueueReceiver on the client.
Here is a snippet of the client side code that waits for messages:
| while (true) {
| try {
| log.debug("receiving message");
| ObjectMessage message = (ObjectMessage) consumer.receive(QUEUE_WAIT_SECONDS *
1000);
| if (message != null) {
| log.debug("got a message");
| return message;
| } else {
| log.debug("No message found for " + QUEUE_WAIT_SECONDS + "
seconds");
| }
| } catch (InvalidDestinationException ide) {
| log.error("Reply queue no longer exists");
| } catch (Exception e) {
| e.printStackTrace();
| log.error(e);
| throw e;
| }
| }
|
In the same scenario, JBoss 4 threw an exception. JBoss 5 does not, instead, we see the
'No message found...' log entry.
So for JBoss5, how does the queue receiver become aware of the server shutdown/startup?
Thanks
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253617#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...