From 4d030cefb4020535e723e703e4c7bc9b245a72e1 Mon Sep 17 00:00:00 2001 From: "nkl199@yahoo.co.uk" Date: Mon, 9 Dec 2019 16:33:08 +0000 Subject: [PATCH] Document the messenger use Signed-off-by: nkl199@yahoo.co.uk --- docs/vNext/Logging_Control.md | 2 +- docs/vNext/Messengers.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 docs/vNext/Messengers.md diff --git a/docs/vNext/Logging_Control.md b/docs/vNext/Logging_Control.md index 16d9fc598..dcbd42eb0 100644 --- a/docs/vNext/Logging_Control.md +++ b/docs/vNext/Logging_Control.md @@ -3,7 +3,7 @@ layout: pageNext title: "Logging Control" categories: reference permalink: /vNext/logging/ -order: 6 +order: 8 --- ## Table of contents diff --git a/docs/vNext/Messengers.md b/docs/vNext/Messengers.md new file mode 100644 index 000000000..d596aae67 --- /dev/null +++ b/docs/vNext/Messengers.md @@ -0,0 +1,35 @@ +--- +layout: pageNext +title: "Messengers" +categories: reference +permalink: /vNext/caliper-messengers/ +order: 6 +--- + +## Table of Contents + +* [Overview](#overview) +* [Messengers](#monitors) + +## Overview +Caliper uses an orchestrator to control workers that interact with the SUT in order to perform a benchmark. Messages are passed between the orchestrator and all workers in order to keep the workers synchronized, and to progress the specified benchmark tests. A user may specify the messaging protocol that is user by Caliper in order to facilitate communications between the orchestrator and worker. + +## Messengers +The messaging protocol to be used for communications between the orchestrator and worker during a benchmark is declared in the `caliper runtime configuration file`. Unspecified values will default to those specified in the [default configuration file](https://github.com/hyperledger/caliper/blob/master/packages/caliper-core/lib/config/default.yaml). + +Permitted messengers are: +- **Process:** The `process` messenger is the default messenger and is based on native NodeJS `process` based communications. This messenger type is only valid for instances when local workers are being used to perform a benchmark. +- **MQTT:** The `mqtt` messenger uses [MQTT](https://mqtt.org/) to facilitate communication between the orchestrator and workers. This messenger type is valid for both local and distributed workers, and assumes the existence of an MQTT broker service that may be used, such as [mosquitto](https://mosquitto.org/). + +The following yaml extract specifies the use of an MQTT communication method, using an existing MQTT broker that may be connected to via the specified address: +``` + worker: + communication: + method: mqtt + address: mqtt://localhost:1883 +``` + +If not specifying a `caliper.yaml` configuration file, the above may be specified as command line arguments to the CLI process as: +``` +--caliper-worker-communication-method mqtt --caliper-worker-communication-address mqtt://localhost:1883 +```