Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge config does not support spaces in topic names #658

Open
baelter opened this issue Dec 26, 2017 · 6 comments
Open

Bridge config does not support spaces in topic names #658

baelter opened this issue Dec 26, 2017 · 6 comments
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.

Comments

@baelter
Copy link

baelter commented Dec 26, 2017

Even though they should not, topics can include spaces. Bridges configuration does not support this.

https://github.com/eclipse/mosquitto/blob/master/src/conf.c#L1551

Should use conf_parse_string?

@toast-uz
Copy link
Contributor

The topic directive has several parameters. How can we distinguish between a delimiter and a character of space?

@baelter
Copy link
Author

baelter commented Jan 2, 2018

Allow escaped space? "%20" or "\ " or "+", or quoted names.

@toast-uz
Copy link
Contributor

toast-uz commented Jan 2, 2018

Fails backward compatibility.

@baelter
Copy link
Author

baelter commented Jan 2, 2018

You should not be backwards compatible with a bug

@toast-uz
Copy link
Contributor

toast-uz commented Jan 2, 2018

I think it's not a bug, but a current spec of mosquitto.

The bridge topic of mosquitto cannot include spaces implicitly, because there are some delimiters in the directive (bridge) topic. The bridge feature purely depends on each implementation of broker because there is no description of bridge in the standard. Therefore, I'm afraid I think your insist is a little rough.

We have two options:

  1. Express this spec of the directive topic.
  2. Add new directive you wish to support a bridge topics include spaces and keep backward compatibility.

@PierreF PierreF added Type: Enhancement A new feature for a minor or major release. Component: mosquitto-broker labels Jan 5, 2018
@Guzoft
Copy link

Guzoft commented Feb 13, 2019

Could it be possible to accept optional single quotes around the topic name in the bridge configuration?

Accepting all these examples?:

topic 'example/topic/with / spaces/#' in 0 "" ""
topic example/topic/without/space/# in 0 "" ""
topic 'example/topic/without/space/but/with/quotes/#' in 0 "" ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.
Projects
None yet
Development

No branches or pull requests

4 participants