MQTT topics with whitespace cause client disconnects
Author: nilseckertCreated Sep 17, 2026Updated Sep 17, 2026
Labelsproposal
Proposed change
Option 1: Log and discard the message instead of disconnecting the client Option 2: Escape whitespace (maybe percent-encoding like URL encoding)
Use case
MQTT 3.1 explicitly allows whitespaces in topics. So NATS MQTT Adapter should somehow support these kind of messages.
see: https://github.com/evcc-io/evcc/issues/33818
Version: nats-server 2.14.6
Contribution
I'm happy to provide a PR for option 1 or option 2.
Submission acknowledgment
- I am a human being writing in my own words and not an AI agent. I will not use an AI agent to communicate on my behalf in this issue, either directly or via copy-paste.
Source: nats-io/nats-server