activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JRR <>
Subject Does the producer know if a send fails with messages that are not persistent?
Date Thu, 08 Dec 2011 02:10:21 GMT

I'm using ActiveMQ CPP 3.4.0 and I've noticed that there is a huge
difference in the amount of time the producer's send() method takes
depending upon if the delivery method is PERSISTENT or NON_PERSISTENT.

I'm using the simple_producer.cpp example that comes with the distribution.
I've adjusted the number of messages that are sent and added some timestamps
before and after certain parts of the code to see how it behaves. On
average, the amount of time to send when the producer is set to PERSISTENT
delivery mode set is 211,314 milliseconds. And if it is set to
NON_PERSISTENT it is 17,362 milliseconds. This was done for a sample set of

However, I don't fully understand what persistent vs non-persistent means. I
found the CPP client documentation for this at:

The description indicates that we would use NON_PERSISTENT if we feel it's
okay if we occasionally lose a message.

However, how would this message be lost? Are we saying that it could be lost
when the client is sending it to the broker, like TCP vs. UDP? Or is it
saying that the broker could decide to discard the message? Will the
producer be alerted if the message was lost during the send to the broker?

I've been told that our broker has been configured so that messages are aged
out after 5 minutes, or FIFO'd out once a certain amount of disk space is
reached for the broker's persistence. I'm confused how the delivery method's
persistence factors in. I thought persistence was a configuration setting
for the broker.

Thanks in advance,


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message