I'm evaluating Amazon MQ (Managed service of ActiveMQ) for some of my use-cases. The issue I find is all the topics and messages are lost after some period of time (lets say after 5 hours). The messages had the QoS of 1 and retain flags set to be true. How to resolve this issue? Do we need to change any part of the configuration file of the service (I'm currently using the default configuration file provided by AWS for Amazon MQ). Or is this the default behavior? Can it be overridden?
Asked
Active
Viewed 734 times
1
-
Based on your `mqtt` tag I assume you're using an MQTT client, but I wanted to confirm to be sure. Please clarify this in your question. – Justin Bertram Feb 19 '20 at 03:58
-
Also, what are your clients doing during this time? MQTT (assuming that's what you're using) follows a publish/subscribe model so messages are only delivered to clients which are subscribed and if you remove a subscription then all the messages in that subscription will be removed as well. – Justin Bertram Feb 19 '20 at 04:08
-
@JustinBertram Yes, I'm using MQTT. I know the basic functioning of MQTT, and the system is working fine. But the issue is If there is a message that has been retained and a client has already consumed it, after a period of time, the are purged by ActiveMQ. I was wondering how can be disable this behavior. – Arun K Feb 19 '20 at 04:23
-
I guess, I've found the solution. ActiveMQ has a configuration file where a you are allowed to set `gcInactiveDestinations` and `schedulePeriodForDestinationPurge`. Setting these values accordingly will resolve my issue. Will try it and update my findings here. – Arun K Feb 19 '20 at 04:31
-
The above settings worked. – Arun K Feb 22 '20 at 06:42