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

MQTT 5 support for bridges #1292

Open
Johann-Angeli opened this issue May 24, 2019 · 3 comments
Open

MQTT 5 support for bridges #1292

Johann-Angeli opened this issue May 24, 2019 · 3 comments
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.
Milestone

Comments

@Johann-Angeli
Copy link

Is it possible to add the support of MQTT 5 with bridges ?

@ralight
Copy link
Contributor

ralight commented May 28, 2019

Yes! I didn't want to delay 1.6 to put it in though.

@ralight ralight added Type: Enhancement A new feature for a minor or major release. Component: mosquitto-broker labels May 28, 2019
@Johann-Angeli
Copy link
Author

Great news.

I took a look on the code, and it look like I just have to patch the existing code that load the bridge configuration (see below) for adding the support of the v5 parameter.

see conf.c
if(!strcmp(token, "mqttv31")){
cur_bridge->protocol_version = mosq_p_mqtt31;
}else if(!strcmp(token, "mqttv311")){
cur_bridge->protocol_version = mosq_p_mqtt311;
}else if(!strcmp(token, "mqttv5")){
cur_bridge->protocol_version = mosq_p_mqtt5;
}else{
log__printf(NULL, MOSQ_LOG_ERR, "Error: Invalid bridge_protocol_version value (%s).", token);
return MOSQ_ERR_INVAL;
}

I hope that after this the bridge will act as a standard mqtt client supporting mqtt v5.
Can you confirm me that point ?

I would like to test that feature before an official release.

Thks

@ralight
Copy link
Contributor

ralight commented May 29, 2019

Possibly! I feel as though there should be more to it than that though.

I've not got time to look at this right at the moment, so feel free to experiment and report back if you want. Something you could try would be to modify the tests in test/broker/06* to use the new mqttv5 bridge option. That would give us some basic operation at least. Then other changes like modifying subscription options to support the "no local" and "propagate retain" features in MQTTv5 would be needed. At the moment these options are produced in a non standardised way.

@ralight ralight added this to the 1.7 milestone May 29, 2019
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

2 participants