I am installing and running ActiveMQ 5.9.0 with almost default configuration.
The only difference was changing <kahaDB> to <levelDB> as
persistenceAdapter.

Also, I am not using a "test script" but instead a rather simple Java JMS
application using standard JMS 1.1 API.

Here are some of the relevant code snippets:

// Creating a Session
Session session = brokerConn.getConnection().createSession(false,
Session.AUTO_ACKNOWLEDGE); // NOTE AUTO_ACKNOWLEGE does not have any effect
with nessage producer
// Create a destination
Destination dest = session.createQueue(queueName);
// Creating a MessageProducer
MessageProducer msgProducer = session.createProducer(dest);
msgProducer.setDeliveryMode(2); // 2 == persistent

And then in a loop 1000 times with a random TextMessage I call:
msgProducer.send(msg);

So, as you can see, nothing special here.

However, I think I know where the performance difference comes from.
I believe there is a bug in the AMQP Connector (for which I will create a
JIRA).

Here is my test:
1. Write 10,000 messages into a persistent queue using the AMQP 1-0 JMS
client. Sometime in the middle of this, I kill my ActiveMQ process (kill -9
<pid> on Linux). The client errors out and I report the number of sent
messages in the log file
2. Same as #1, except I am using the ActiveMQ 5.9.0 client in my application

In case #1, my client reported 5,738 messages written. However, after
re-starting ActiveMQ, the queue only contained 5,642 messages - I "lost" 96
messages!!
In case #2, my client reported 4,322 messages written and after re-starting
ActiveMQ, the queue contained exactly 4,322 messages (same result regardless
whether I use KahaDB, LevelDB Java, or LevelDB JNI).

It appears that the AMQP Connector within ActiveMQ is acknowledging the
receipt of messages to the client *before* they actually got persisted to
disk. This would also explain the performance difference in my tests above.
Before I file a bug, I run the same tests against a qpid-cpp broker and see
whether the bug is in the AMQP 1-0 JMS client or in the ActiveMQ AMQP
Connector.





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Interesting-Persistent-Messaging-Performance-tp4676001p4676124.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to