I have an ActiveMQ Artemis broker with two MQTT consumers subscribed to topic $share/tasks
, with all parts configured to use QoS 2. Messages are distributed among the consumers following the round-robin algorithm, without regards for consumer availability. As such, the following problematic situation can happen:
I was hoping manual acknowledgment would be the answer here, only acknowledging the slow task after completion, but messages keep being assigned to consumer #1 even if it has not acknowledged prior ones.
The messages keep being assigned to consumer #1 even if it has not acknowledged prior ones might have the following reasons:
By using QoS 1 or 2 and receiveMaximum=1 you can ensure a consumer does not receive another message until it finishes the current one.