Based on https://github.com/wialon/gmqtt/issues/113 I suggest to have the ability to not acknowledge a message at all.
So it should be possible to "return None" in the on_message callback (without raising an exception).
Why? If I want to process a message, but some backend system that I need for processing is unavailable right now, I'd either have to store the message locally somewhere (and process it later) or let the broker know that I have not processed it at all.
Another partial solution would be to disconnect from the broker as long as the backend is unavailable, but still there is a time window where some messages might slip through.
Based on https://github.com/wialon/gmqtt/issues/113 I suggest to have the ability to not acknowledge a message at all. So it should be possible to "return None" in the on_message callback (without raising an exception).
Why? If I want to process a message, but some backend system that I need for processing is unavailable right now, I'd either have to store the message locally somewhere (and process it later) or let the broker know that I have not processed it at all.
Another partial solution would be to disconnect from the broker as long as the backend is unavailable, but still there is a time window where some messages might slip through.