Operation

Publish an AMQP message

The package sbcs-amqp-client provides a command line tool to publish an AMQP message that contains a command in a JSON document.

Installation

$ sudo apt install sbcs-amqp-client

Usage

Help:

$ sbcs-amqp-client 
usage: AMQP client to publish a SBCS command [-h] --command COMMAND --host
                                             HOST --exchange EXCHANGE
                                             [--routingkey ROUTINGKEY]
AMQP client to publish a SBCS command: error: the following arguments are required: --command, --host, --exchange

Publish command message:

$ sbcs-amqp-client  --host=amqp-host --exchange=sbcs-fanout --command=reloadConfiguration

This will publish an AMQP message with content_type application/json and this content:

{
    "command": "reloadConfiguration"
}