MOSQUITTO_BRIDGE(1)

NAME
mosquitto_bridge - an MQTT client for creating, deleting and knowing bridges dynamically.

SYNOPSIS

mosquitto_bridge [-a | --address] [-c | --connection] [-d | --del] [-D | --direction] [-h | --host] [-k | --know] [-l | --local] [-n | --new] [-p | --port] [-P | --pw] [-q | --qos] [-r | --remote] [-R | --remotePort] [-u | --username]

mosquitto_bridge [--help]

DESCRIPTION

mosquitto_bridge is a simple MQTT client that will create or delete a bridge dynamically for Mosquitto broker 1.4.90 or newer without shutdown or SIGHUP signal.

mosquitto_bridge also allows to know active bridges on a broker

OPTIONS

The options below may be given on the command line.

-a, --address
    Define bridge address of bridge. Necessary only with -n.

-c, --connection
    Define the connection name of the bridge.

-d, --del
    Delete a bridge which name is define by -c. Can't be use with -n.

-D, --directoin
    Define direction of the bridge [ in | out | both ].

-h, --host
    Define the network host to connect to the local broker where the bridge will be create/delete or to know active bridges. Defaults to localhost.

-k, --know
    Know all bridges which are active in a broker. Can only be used with options other than -h and -p.

-l, --local
    Define the local prefix for the bridge configuration.

-n, --new
    Define to create a bridge.

-p, --port
    Define the network port to connect to the local broker where the bridge will be create/delete or to know active bridges. Defaults to 1883.

-P, --pw
    Provide a password to be used for authenticating with the broker. Using this argument without also specifying a username is invalid. This requires a broker that supports MQTT v3.1. See also the --username option.

-q, --qos
    Specify the quality of service desired for the bridge between local broker and remote broker, from 0, 1 and 2. Defaults to 0. See mqtt(7) for more information on QoS.

-r, --remote
    Define the remote prefix for the bridge configuration.

-R, --remotePort
    Define the network port to connect to the remote broker. No default value.

-u, --username
    Provide a username to be used for authenticating with the broker. This requires a broker that supports MQTT v3.1. See also the --pw argument.

EXAMPLES

Note that these really are examples.

Three possiblites are available :

- Create a new bridge from a local broker to a remote broker whith -n and all necessary parameters of a bridge (connection, address, topic).

- Delete a bridge present on a local bridge with -d and bridge connection name.

- Know all bridges which are active on a local broker with -k.

Creat a bridge on localhost and default port with another broker on localhost and 1884 port:

    • mosquitto_bridge -c testBridge -a 127.0.0.1 -R 1884 -n -t \# -q 0 -l local/ -r remote/ -D both

Delete a bridge on localhost and default port:

    • mosquitto_bridge -c testBridge -d

Know all active bridges on localhost and default port:

    • mosquitto_bridge -k

BUGS

mosquitto bug information can be found at https://github.com/eclipse/mosquitto/issues

SEE ALSO
mqtt(7), mosquitto_pub(1), mosquitto_sub(1), mosquitto(8), libmosquitto(3), mosquitto-tls(7)

AUTHOR

Tifaifai Maupiti <tifaifai.maupiti@gmail.com>