Skip to content

Experimental MQTT support#5173

Closed
bagder wants to merge 7 commits intomasterfrom
bagder/mqtt
Closed

Experimental MQTT support#5173
bagder wants to merge 7 commits intomasterfrom
bagder/mqtt

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder 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 Compare April 3, 2020 08:47
bagder pushed 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 pushed 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 2 times, most recently from 423d99d to a64b969 Compare April 7, 2020 22:00
@bagder bagder changed the title [WIP] experimental MQTT support Experimental MQTT support Apr 8, 2020
@bagder bagder marked this pull request as ready for review April 8, 2020 12:23
@bagder bagder force-pushed the bagder/mqtt branch 3 times, most recently from 3725c62 to b8ea009 Compare April 12, 2020 22:15
@bagder bagder closed this in 2522903 Apr 14, 2020
@bagder bagder deleted the bagder/mqtt branch April 14, 2020 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants