Friday, November 9, 2012

ActiveMQ 5.3 vs. 5.7

I have been reviewing the latest features of ActiveMQ 5.7.  There are features in 5.7 that are not in the 5.3 version that I'm most familiar with.
Features like:
  • Message Priority
  • Web Sockets
  • Delay and Schedule Message Delivery
  • Cluster and Failover 
  • more
 I did some comparisons of ActiveMQ version 5.3 vs. 5.7 on the following local machine:
Intel Core i7 Q720 @ 1.6GHz with 8gb ram on 64 bit Windows 7 Ultimate.

Scenario 1: Producing and Consuming small 'hi' test messages of the amount of 10K on 5.7 ActiveMQ versions locally using ONE consumer with transacted messages (activemq-all-5.7.0.jar).
Scenario 2: Producing and Consuming small 'hi' test messages of the amount of 10K on 5.3 ActiveMQ versions locally using ONE consumer with transacted messages. (activemq-all-5.3.0.jar)
Scenario 3: Producing and Consuming small 'hi' test messages of the amount of 10K on 5.7 ActiveMQ versions locally using ONE consumer with NON transacted messages. (activemq-all-5.7.0.jar)Results:
Scenario 4: Producing and Consuming small 'hi' test messages of the amount of 10K on 5.3 ActiveMQ versions locally using ONE consumer with NON transacted messages. (activemq-all-5.3.0.jar)Results:

TransactedProducing 10,000 MessagesConsuming 10,000 MessagesActive MQ Version
Scenario 1 1.8 Seconds (avg)113 Seconds (avg)5.7
Scenario 2 2.8 Seconds (avg)110 Seconds (avg)5.3
Non-Transacted   
Scenario 3 2.8 Seconds (avg)12.3 Seconds (avg)5.7
Scenario 4 2.0 Seconds (avg)9.3 Seconds (avg)5.3


Conclusion: Speed isn't sufficient enough to warrant an upgrade in this case as they both are basically running at the same pace, however the most interesting part I saw here was the speed differences between Transacted messages (slower) and Non-Transacted Messages.  By a multiplier of about 10X, transacted message consumption through the ColdFusion Gateway slows down.  Its worth asking yourself "Can I handle a loss of messages?" at this speed difference.

The stability of the two of them should be similar but we will have a chance to put 5.7 to the test soon enough.  If you're seeing some strange issues in production like we are where ActiveMQ gets into a 'stalled' state where its neither producing, nor allowing consumption of messages in it's queues, you are not alone.  I've seen graphs that have shown ActiveMQ in this state and a restart is the only thing that brought it back to life (5.3).  After churning through millions of messages a day, I'd guess something might hit a breaking point, but hopefully 5.7 will give us a bit more stability over the long haul.  Better monitoring of the queue counts need to be in place for us to reliably use 5.3 now, however I like it for it's features, ease of use and integration with ColdFusion (thanks Sean Corfield for the Gateway and Documentation!).

No comments: