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
- Using
non-persistent delivery mode
(vm://localhost
)(http://activemq.apache.org/what-is-the-difference-between-persistent-and-non-persistent-delivery.html) - Using spring integration for put/fetch messages in/from queue/channel.
- Using
max-concurrent-consumers
with10
threads - Assume all other configs are by default with ActiveMQ and Sprig-integration.
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 withpersistent delivery mode
(tcp://
). I have already tested with this mode, but it seems consumers are very slow here. Also, I have already tried to useDUPS_OK_ACKNOWLEDGE
to make my consumer fast withpersistent delivery mode
but no luck.
NOTE : I am using latest ActiveMQ version 5.14