I have a spring application generating and sending IBM JMS messages to a Webshpere MQ. I'm printing out the messages to console and can see the queue depth changing in MQMonitor but when I go to browse the messages in the queue, there aren't any to be browsed on. AND when I terminate the program I the queue depth resets itself back to 0.
One possibility is that from you spring application you are sending the message to the queue in the transactional mode, in this case when the message is sent you might see the message depth increasing in the MQMonitor, but from your spring applicaton you would not have commited the transaction.
In the above case though you see the queue depth increasing, but you cannot browse the message in the queue from MQMonitor. For the same reason when you terminate your application the queue depth will return back to 0.