When a message (MQTT (3.1) QoS1) that does not have a client consuming the underlying topic is physically removed from the KahaDB ActiveMQ (5.15) database?
Example 01:
- MQTT (3.1) message with content "foo" with QoS1 sent to the topic "topic-foo".
- Broker is ActiveMQ 5.15 and received the message
- There is no consumer to the topic "topic-foo"
- Message is not dequeued from the broker.
- When the message will be removed from the KahaDB physically?
Example 02:
- MQTT (3.1) message with content "foo" with QoS1 sent to the topic "topic-foo".
- Broker is ActiveMQ 5.15 and received the message
- There is a consumer to the topic "topic-foo" over a ClientAcknowledge mode session.
- Message is received by the consumer, however, is not acknowledged for any reason.
- Message is not dequeued from the broker.
- When the message will be removed from the KahaDB physically?
When there is no consumer/subscriber on a topic and a message is sent to that topic then the message is simply discarded. It is never actually stored on disk physically.
When there is a consumer/subscriber on a topic and a message is sent to that topic then the message will be physically stored on disk and only removed when that message is acknowledged.