I am using ActiveMQ Artemis for data delivery, but the data in the queue is not persistent.
When I bring down the server using artemis.cmd stop and restart using artemis.cmd run, the message count in the queue becomes 0.
Broker.xml :
<persistence-enabled>true</persistence-enabled>
<max-disk-usage>100</max-disk-usage>
There are a handful of broker and client details that need to be accounted for to ensure messages are persisted to disk.
<persistence-enabled>true</persistence-enabled>
. You've already done this so you're in good shape there.<queue>
you're working with is "durable." This is true
by default so it doesn't need to be explicitly set on the queue, but if you wanted to set it you would do so with <durable>true</durable>
. To be clear, the <max-disk-usage>
parameter doesn't control message persistence. It controls the amount of disk the broker will consume before it starts blocking message production.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.