MQTT, Shared Subscription, Failover+Load Balancing query

We are implementing a failover scenario with mosquitto, where we have N instances of a system, each having a consumer to a topic.

The topic is using a shared subscription ($share/testgroup/test/#), and there are multiple producers putting data into it, using topicnames like “testgroup/test/”.
The Qos is set to 2, for guaranteed delivery.

Each consumer registers with a unique id and the topic data is shared evenly across the clients.

If a consumer dies, the broker buffers the messages for that client, and the instant the client resumes operation, it picks up where it left off.

This is great but if the consumer is offline for a long period, these messages will soon back up, and from our viewpoint it would be better if the messages could then be redistributed from the brokers storage, to the next available consumer.

The instant the broken consumer comes back, the message distrubution should adjust back to it’s
original state.

Is this possible with Mosquitto please?

Is there a prescribed MQTT solution to this problem ?

Thanks in advance

Hi Derrick,

Currently this isn’t possible I’m afraid.

I’ve been mulling this over. I agree with you that this should work differently than it does, or at least there should be the option for it to work differently. It isn’t currently possible in mosquitto right now - perhaps it would be good for us to have a talk about your requirements?