Why do I not get all of the messages I sent

 FAQ > Errors > Why do I not get all of the messages I sent

For ActiveMQ 3.x/4.x

As Matt reported its possible that there is a race condition in your application; are you sure you had created your consumer and called start() on the JMS Connection before the producer started publishing messages?

Another option if startup race conditions are a problem is to use durable messaging.

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