mqtt_cpp icon indicating copy to clipboard operation
mqtt_cpp copied to clipboard

Future improvement: Compile time option to completely remove MQTTv3 code.

Open jonesmz opened this issue 5 years ago • 2 comments

E.g., in my situation, I'm not interested in MQTTv3 compatibility. As a result, it would be convenient for me to be able to turn off v3 compatibility at compile time. This would improve build times, and reduce attack surface for security issues.

I'm sure there are MQTT applications that will remain MQTTv3 for a long time. For those applications, disabling MQTTv5 would be nice to have as well.

jonesmz avatar Jun 28 '19 07:06 jonesmz

My broker supports both v3.1.1 and v5. This means the one accept mixed clients.

If we have 3 choices, it is nice.

  1. Both v3.1.1 and v5 support.
  2. Only v5 support
  3. Only v3.1.1 support

redboltz avatar Jun 28 '19 09:06 redboltz

Right, that's what I meant.

I imagine the way it would be implemented is with #ifdef style macros.

Either way, something for the far future. No reason to make this change now.

jonesmz avatar Jun 28 '19 17:06 jonesmz