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

Experimental MQTT support #5173

Closed
wants to merge 7 commits into from
Closed

Experimental MQTT support #5173

wants to merge 7 commits into from

Conversation

@bagder
Copy link
Member

bagder commented Apr 2, 2020

This is @zagor's initial work taken a bit further, with polish and test cases (1190 - 1193).

  • rebased and polished on top of master
  • test SUBSCRIBE
  • verify the protocol part in test cases
  • test PUBLISH
  • fix the busy-sending in curl
  • test publish/subscribe > 128 bytes topics and payloads
  • add Linux+macOS CI builds
  • test against REAL servers (see for example https://test.mosquitto.org/)
  • handle EAGAIN for reads
  • receive data alloc-free (using the receive buffer)
  • squash the work into a few reviewable commits
  • make the MQTT CI job on Linux run green
  • make the MQTT CI job on Windows run green
  • make the MQTT CI job on macOS run green
  • make the cmake build not think mqtt is enabled when it isn't
  • make sure MQTT is disabled in all builds unless explicitly enabled

Merge plan

Once the CI builds are green and the checkboxes here are all checked, we merge. This feature is EXPERIMENTAL anyway and must be explicitly enabled in the build so therefore I'm allowing this to get merged even in feature freeze. Assuming it looks fine.

Todo and remaining lissues

The wiki has more details.

Videos of the initial work

Videos showing how we got here: episode 1 episode 2

@bagder bagder force-pushed the bagder/mqtt branch 2 times, most recently from 9ef5659 to 9d16ac3 Apr 2, 2020
bagder added a commit that referenced this pull request Apr 3, 2020
Support MQTT using the mqtt://host/topic URL scheme.

A plain GET subscribes to the topic and prints all published messages.
Doing a POST publishes the post data to the topic and exits.

Example subscribe: curl http://host/home/bedroom/temp
Example publish: curl -d 80 http://host/home/bedroom/dimmer

Limitations:
 - No username support
 - Only QoS level 0 is implemented for publish
 - No way to set retain flag for publish
 - No username/password support
 - No TLS (mqtts) support

Co-authored-by: Daniel Stenberg

Closes #5173
@bagder bagder force-pushed the bagder/mqtt branch from fcd1784 to 619458c Apr 3, 2020
bagder added a commit that referenced this pull request Apr 6, 2020
Support MQTT using the mqtt://host/topic URL scheme.

A plain GET subscribes to the topic and prints all published messages.
Doing a POST publishes the post data to the topic and exits.

Example subscribe: curl http://host/home/bedroom/temp
Example publish: curl -d 80 http://host/home/bedroom/dimmer

Limitations:
 - No username support
 - Only QoS level 0 is implemented for publish
 - No way to set retain flag for publish
 - No username/password support
 - No TLS (mqtts) support

Co-authored-by: Daniel Stenberg

Closes #5173
@bagder bagder force-pushed the bagder/mqtt branch from 3ab09a5 to 8fa61ec Apr 6, 2020
bagder added a commit that referenced this pull request Apr 7, 2020
Support MQTT using the mqtt://host/topic URL scheme.

A plain GET subscribes to the topic and prints all published messages.
Doing a POST publishes the post data to the topic and exits.

Example subscribe: curl http://host/home/bedroom/temp
Example publish: curl -d 80 http://host/home/bedroom/dimmer

Limitations:
 - No username support
 - Only QoS level 0 is implemented for publish
 - No way to set retain flag for publish
 - No username/password support
 - No TLS (mqtts) support

Co-authored-by: Daniel Stenberg

Closes #5173
@bagder bagder force-pushed the bagder/mqtt branch 2 times, most recently from 423d99d to a64b969 Apr 7, 2020
@bagder bagder changed the title [WIP] experimental MQTT support Experimental MQTT support Apr 8, 2020
@bagder bagder force-pushed the bagder/mqtt branch from 4618e6b to 588dde7 Apr 8, 2020
@bagder bagder marked this pull request as ready for review Apr 8, 2020
@bagder bagder force-pushed the bagder/mqtt branch 3 times, most recently from 3725c62 to b8ea009 Apr 9, 2020
bagder and others added 7 commits Apr 14, 2020
The mqtt server is started using a "random" port.
@bagder bagder force-pushed the bagder/mqtt branch from b8ea009 to c9fe077 Apr 14, 2020
@bagder bagder closed this in 2522903 Apr 14, 2020
@bagder bagder deleted the bagder/mqtt branch Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.