Skip to content

A broker-less MQTT messaging bus for distributed real-time applications.

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.md
Notifications You must be signed in to change notification settings

emqplus/emqtt-bus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

emqtt-bus

A broker-less MQTT messaging bus for distributed real-time applications.

Build

$ make

Run

$ make run

Pub/Sub

Open console 1:

emqtt_bus:subscribe("t").

Open console 2:

emqtt_bus:publish("t", "p").

Query peers on any console:

emqtt_bus:peers().

Domain

Each MQTT bus is physically isolated in a domain, which is identified by the domain ID.

Create an MQTT bus in domain 1:

emqtt_bus:open(1).
emqtt_bus:subscribe(1, "t").
emqtt_bus:publish(1, "t", "p").

Create an MQTT bus in domain 2:

emqtt_bus:open(2).
emqtt_bus:subscribe(2, "t").
emqtt_bus:publish(2, "t", "p").

Router

A router routes messages between different MQTT buses.

emqtt_bus_router:start_link(1, 2).

Bridge

A bridge routes messages between an MQTT bus and an MQTT broker.

emqtt_bus_bridge:start_link(1, [{host, "broker.emqx.io"}]).
emqtt_bus:publish(1, "t", "d").

Use mqttx to connect to broker.emqx.io and subscribe to the "t" topic, you will receive messages published from the MQTT bus 1.

About

A broker-less MQTT messaging bus for distributed real-time applications.

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published