Feb 27th, 2008, 09:22 AM
DefaultMessageListenerContainer does not receive messages after restart
Today I tried to connect 2 Spring-based apps with JMS (JmsTemplate and DefaultMessageListenerContainer). It works fine, but when I stop the receiving app and send some messages with the sending app, these messages will not be received after a restart of the receiving app. The subsequent messages will be received again, but not the messages in between.
Any ideas where my messages are? I'm using ActiveMQ and Tomcat.
Mar 5th, 2008, 03:54 PM
this sounds very much as if you haven't configuered persistent queues on ActiveQM.
Mar 5th, 2008, 09:29 PM
Do you see the messages in the Queue? What type of queues you are using? Permanent queues or Temporary Queues?
Mar 6th, 2008, 01:15 AM
Thanks for the replies. Yes, I was sure it must be a simply issue ;-) Temporary Queues. Thought that ActiveMQ would use permanent queues by default.
Mar 6th, 2008, 08:22 AM
It doen't matter what Active Mq is using. All it matters which queue you are using when you are calling .send(). If you are using Temporary Queues, you cannot retain the message. Only if you are having permanent queues and if have set the queue properties correctly, messages will be there in the queue. Do remember there is a bug in Spring 2.5.1. Even in case of success, message are still present in the queue. This bug is resolved in Spring 2.5.2