Message Queuing

We have specific requirement that,
If multiple subscribers are subscribed to single topic, in this case how to decide that when to delete the topic/message from queue, Because there is possibility that some subscribers have received the message but some are still not. e.g. assume that there are 10 subscribers that have subscribed to single topic, 5 of them received the message, eventually broker went down and there are still 5 subscribers remaining to receive the message. If we use message expiry then it might possible that remaining 5 subscribers never receive the message. How to handle these cases in HiveMQ.
And same is possible with Queue limit.

Hi @girishgsv ,

This is managed on the MQTT broker side and according to the MQTT protocol specification.
MQTT manages the re-transmission of messages and guarantees delivery (even when the underlying transport is not reliable) based on QoS, QoS makes communication in unreliable networks a lot easier.
QoS – The Quality of Service (QoS) level is an agreement between the sender of a message and the receiver of a message that defines the guarantee of delivery for a specific message. There are 3 QoS levels in MQTT:

  • At most once (0)
  • At least once (1)
  • Exactly once (2).

In your case if you want the message delivered to subscribers with a guarantee, you use QoS 1 or 2. The broker will manage the re-transmission and queue so that QoS requirement is met.

Learn more about QoS, Message Expiry and other exciting MQTT features from our course of lectures MQTT Essentials - All Core Concepts explained

I hope this helps,
Dasha from HiveMQ team