Hello, 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 10,000. However, I don't fully understand what persistent vs non-persistent means. I found the CPP client documentation for this at: http://activemq.apache.org/cms/api_docs/activemqcpp-3.0/classcms_1_1_message_producer.html http://activemq.apache.org/cms/api_docs/activemqcpp-3.0/classcms_1_1_delivery_mode.html 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, -=John -- View this message in context: http://activemq.2283324.n4.nabble.com/Does-the-producer-know-if-a-send-fails-with-messages-that-are-not-persistent-tp4171293p4171293.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.