Skip to content

Enable mqtt websocket transport #130

@VigneshVSV

Description

@VigneshVSV

Please describe.
Enable websocket transport mode in MQTT.

Use cases
For clients on the web browser

Describe the solution you'd like
The paho mqtt/aiomqtt implementation we use already supports websockets. There is an infrastructure repo where an MQTT broker has been setup in docker.

Rough Steps:

  • add __init__ argument use_websocket (or similar) to denote that the messages will be published or received over websocket. Do this for both hololinked.server.mqtt and hololinked.client.mqtt (publisher and consumer, respectively)
  • test it with the MQTT broker in the infrastructure repo . We dont test it in CI-CD currently. Also setup SSL in the mqtt config in the infrastructure repo (please make a PR there, not here).
  • Update the TD forms in the MQTTPublisher to use websocket URL in the href field. The format can be seen here. Ignore the lack of consensus stated in that article, we will use the URL anyway. We will include the scheme (mqtt:// or wss://). The URL should be specified in a format accepted by the paho/aiomqtt client, that is the bottom line.

Additional context
If contributing first time, CONTRIBUTING.md can help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    beginnerbeginner level good first issues, usually issues that can worked on without skimming the whole repogood first issueGood for newcomers

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions