Skip to content

Commit

Permalink
Merge pull request #683 from nklincoln/messenger-docs
Browse files Browse the repository at this point in the history
Document the messenger use
  • Loading branch information
nklincoln authored Jan 15, 2020
2 parents c002e07 + 4d030ce commit 4f67a92
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/vNext/Logging_Control.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: pageNext
title: "Logging Control"
categories: reference
permalink: /vNext/logging/
order: 6
order: 8
---

## Table of contents
Expand Down
35 changes: 35 additions & 0 deletions docs/vNext/Messengers.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 4f67a92

Please sign in to comment.