Java – why is ActiveMQ 20% faster using the memorypersistencedadapter?
I am using active MQ with 99% non persistent themes For some tests where I only use non persistent messages, I have tried to force the proxy to use the memorypersistence adapter, which will have an impact I changed the configuration to:
<beans> ... <broker ... persistent="false"*> ... </beans>
It does make a difference! The throughput increases by about 20%
Theoretically, there is no need to stick to it, so there is no difference at all What happened here?
Solution
Queue and topic persistence requires that messages be written somewhere so that any undelivered messages still exist and can be extracted when the provider / server restarts
Topic persistence is actually only relevant when a persistent subscription is in progress. If there is no persistent subscription and there is no active consumer of the topic, the message will be deleted immediately anyway
It is possible to use a large number of active messages and a minimum number of consumer threads, and the processing may lag behind, so the provider / server will receive messages when it restarts... But I believe your consumer must connect almost immediately