Reputation: 609
I have a status topic, published using QoS 1 & retained message = true over ActiveMQ (docker rmohr/activemq:5.15.9). I want my dashboard to be able to late subscribe to the topics and always receive the last published message.
The retained functionality seems to work well but the message seems to be wiped out upon ActiveMQ broker restart.
If I stop publishing to the topic, restart the broker, and try to late subscribe, I do not receive the last message (the one that was retained before the broker restart).
I use the default container configuration (kahadb & filesystem directory mounted for data/ and conf/). I thought that the retained meesage would be in kahadb but it is empty. The ActiveMQ ui also shows empty queue for topic after broker restart.
It is expected behavior? Can I achieve retained message persistence through broker restart with ActiveMQ? How should I proceed?
Upvotes: 0
Views: 478
Reputation: 263
The retain message should not be lost under any circumstances unless the client publishes an empty retain message
You can switch to EMQ x to avoid this problem. You can store the data on disk or in your favorite database
Upvotes: -1