I am not receiving any messages, what is wrong

 FAQ > Errors > I am not receiving any messages, what is wrong

I am not receiving any messages - what is wrong?

A very common gotcha when working with JMS is forgetting to start the JMS connection, creating a consumer and not having it receive any messages. I myself have tripped up over this one many many times! (smile)

Make sure you call the start() method on the JMS connection, otherwise messages will not be dispatched to your consumer.

This is such a common gotcha that as of 4.2 onwards, ActiveMQ Classic will now log a warning if a message is received shortly after the connection was created if the connection was not started (as its so easy to forget to do this part (smile).

For more details see the discussion of the warnAboutUnstartedConnectionTimeout property on the Connection Configuration URI

If you are calling connection.start()

Another common gotcha is due to another consumer grabbing the messages. If it’s not that then please look at JMX or the Web Console to determine what consumers are available and their status. Then report an issue to help you resolve your issue.

Apache, ActiveMQ, Apache ActiveMQ, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. Copyright © 2024, The Apache Software Foundation. Licensed under Apache License 2.0.