Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

heimsphere/mqtt-websockets-bridge

Repository files navigation

About

Proof-of-concept MQTT to Websockets bridge.

The bridge forwards messages from websocket clients to the MQTT broker and vice versa.

Getting Started

  1. Install the dependencies and start the mosquitto server.

     mosquitto
    
  2. Build and start the bridge.

     cd mqtt-websockets-bridge/src
     make
     ./bridge
    
  3. Open public/index.html in multiple browser instances.

  4. Publish a message using the mosquitto client.

     mosquitto_pub -t /foo/bar -m "Hello World"
    

Protocol

PUB/SUB

see PUBSUB documentation

RPC

see RPC documentation

Dependencies

  • libwebsockets 1.23
  • mosquitto 1.2.3
  • A websockets capable browser
  • A posix compliant system (Only tested on OS X 10.9.1)

Clients

see MQTT Clients

Limitations

The event loop integration of mosquitto and websockets is very simple. Both loops simply run alternating for 20 milliseconds.

Currently only simple subscription is possble by sending the topic path through the websockets connection. This is subject to change.

TODO

  • Benchmark
  • Tests

About

Proof-of-concept MQTT to websockets bridge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages