In bridge__on_connect() in bridge.c: send__real_publish() is called with a newly generated MID. The MID is not registered properly within the mosquitto framework.
As a result, when receiving the PUBACK mosquitto does not know which message this MID belongs to. But with every PUBACK the send quota is incremented. So that's the next problem: When publishing to the notification topic, the quota was not decremented in the first place. But when getting the response it's incremented.
You end up with a higher quota than you should have.
Possible fix:
register the MID when publishing just like any other message (and maybe set some message expiry?)
and decrement quota when publishing to notification topic
In bridge__on_connect() in bridge.c: send__real_publish() is called with a newly generated MID. The MID is not registered properly within the mosquitto framework. As a result, when receiving the PUBACK mosquitto does not know which message this MID belongs to. But with every PUBACK the send quota is incremented. So that's the next problem: When publishing to the notification topic, the quota was not decremented in the first place. But when getting the response it's incremented.
You end up with a higher quota than you should have.
Possible fix:
This bug is related to https://github.com/eclipse/mosquitto/issues/2301 / 1st bug