-1

I am using ActiveMQ where I need following requirements

  • To have very fast consumers as my producers are already very fast
  • Need processing at lease 2K messages per second
  • Not require to process/consume messages again in case of server crash or other failures. I can trigger whole process again.
  • Needs to run very normal configuration server - 4Gib RAM

I have configured ActiveMQ as given below

Problems/Questions

  • I am not sure how ActiveMQ stores messages in case of non-persistent delivery mode, is it possible that my process will fail with out of memory errors once my queue size exceed some limit? I am asking this because it's very difficult to test whole process for me. So I needs to be aware about limitation before I trigger the process.
  • If non-persistent delivery mode is not sufficient with my above requirements, is there any performance tuning tips with which I can achieve my requirements with persistent delivery mode (tcp://). I have already tested with this mode, but it seems consumers are very slow here. Also, I have already tried to use DUPS_OK_ACKNOWLEDGE to make my consumer fast with persistent delivery mode but no luck.

NOTE : I am using latest ActiveMQ version 5.14

Vishal Zanzrukia
  • 4,902
  • 4
  • 38
  • 82

1 Answers1

1

I am not sure how ActiveMQ stores messages in case of non-persistent delivery mode

Activemq store messages in the memory at first, and it will also swap it to the disk(there is a tmp_storage folder in activemq's data path).

is it possible that my process will fail with out of memory errors once my queue size exceed some limit

I have never met out of memory in activemq, even with about one million messages.

You can also make sure by the producer flow control(http://activemq.apache.org/producer-flow-control.html). You can make the producer hang when there is too many messages not consumed.

And about performance of persistent delivery, I also have no good methods.

Mobility
  • 3,117
  • 18
  • 31
  • Thanks for your reply @MallowFox.. can you explain bit about `producer-flow`. As per my understanding it's automatic configured right? or should we needs to do anything to slow producer flow in case of heavy load? – Vishal Zanzrukia Mar 09 '17 at 09:28
  • @Vishal Zanzrukia You just need to set the memoryUsage limit and tempUsage limit in activemq's config xml. And the producer is automatically slowed down when there is heavy load. – Mobility Mar 09 '17 at 10:30