Public Repository

Last pushed: 2 years ago
Short Description
C version of the DoubleDecker broker
Full Description

For an introduction to the functionality of DoubleDecker, see
This image can be configured using environment variables.

BROKER_PORT: where to listen for incoming client / broker connections. Either tcp://*:<port> or ipc://<file>
BROKER_SCOPE: the scope of the broker, default "0/0/0"

DEALER_PORT: where to connect to another broker, either tcp://<ip>:<port> or ipc://<file>
DEBUG: set the logging level from default INFO to e/w/n/i/d/q for ERROR,WARNING,NOTICE,INFO,DEBUG, and QUIET
MONITOR: open a monitoring socket at /tmp/$MONITOR.monitor
KEYS: use $KEYS instead of /keys/broker-keys.json for reading the keys

To run the broker, first you need to generate keys for the tenants and brokers using the script from github.

Single-layer broker, exposed over TCP/IP:
docker run --name broker0 -v /etc/doubledecker/:/keys -p 5555:5555 -p 5556:5556 -p 5557:5557 acreo/ddbroker:latest

Multi-layer broker, over TCP/IP. Start the single-layer broker, and connect to it with a second broker:
docker run --name broker1 -v /etc/doubledecker/:/keys -p 5565:5555 -p 5566:5556 -p 5567:5557 --link broker0:dealer acreo/ddbroker:latest

Clients can now be connected to the brokers, e.g. start two clients, alice and bob:
ddclient -c a -k /etc/doubledecker/a-keys.json -n alice -d tcp://
ddclient -c a -k /etc/doubledecker/a-keys.json -n bob -d tcp://

alice can now send messages to bob using:
alice>> notify bob message

alice can subscribe to a topic on a particular scope using:
alice>> subscribe topicA all

which bob can publish on:
bob>> publish topicA test

Docker Pull Command