Disable MQTT v3.1 support

Hi,

Is it possible to disable the mosquitto broker’s v3.1 support? I’d like to allow only v3.1.1 and v5.0 clients to connect.

Thanks in advance

Hi Onur,

There isn’t built in support for this in version 2.0. It would be possible to do that inside a plugin though. Let me know if you’d like any help with that. It is in the upcoming 2.1 release using the accept_protocol_versions option, e.g. accept_protocol_versions 4,5.

Out of interest, what is it about the v3.1 clients that concerns you?

Cheers,

Roger

Hi Roger,

Thanks for the info. We see that the IOT devices do not sent SUBSCRIBE command if they reconnect with v3.1. Since we don’t have any control on the IoT firmware, we want them to connect with v.3.1.1 only.

I’d like to get some details about the plugin that you’re talking about.

Hi Onur,

I see! How annoying for you.

What version of Mosquitto are you using, and what do you use for authentication?

Cheers,

Roger

Yes, it was annoying but happy to figure out the problem! :slight_smile:

Mosquitto version is 2.0.14 and we use the normal user/pass with the passwd file for authentication.

Hi Onur,

I’ve made an example plugin that should work with a password file. There are details in the .c file: mosquitto/plugins/deny-protocol-version at master · eclipse/mosquitto · GitHub

Cheers,

Roger