Broker of messages (broker)

Description

System Message Broker.
Ensures data is received and retained without disrupting enrollment.

Guarantees delivery of received messages to consumers. When a message is taken by a consumer, the message is automatically deleted (unlike the well-known brokers that save messages for some time). +

Temporarily and limitedly stores event data from various processes generated at the current site.
Used as a job queue for post-processing processes (cdr aggregator, mixer, packager, stenographer, etc.).

Reserved in mode Active-Passive.
Scalable by partitioning into groups by domain. Potentially, in case of performance shortage it can be divided into groups by queue names. Principle: one queue - one group.

Table 1. System Characteristics

Code

broker

Mode of operation

Service, storage

Backup mode

Active-Passive

Types of sites

Any

Layer

Business logic

Placement

Internal

Saving and restoring state on reboot

Yes

appendix

era_broker

Own storage

ODB Mnesia

Limitations

  • The maximum number of items in one queue is 2 million. When the limit is reached, the oldest messages are automatically deleted.

  • The maximum message broker throughput for receiving and issuing messages is about 40 thousand messages per second.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and numbers, must begin with a letter.

roletype

str

required

Role Type. Possible values: "broker".

iface

str

required

The alias of the server network interface on which the roles will interact internally with each other.

ext

json

empty

Additional role options. Contains a json object or list.

enabled

bool

empty

Role activity flag. When set to false, the role does not participate in validation and is not started.

group

int

required

Group Number.
As part of horizontal scaling, a role can be divided into multiple groups on a site, with only one instance active in each group and the rest reserved.
Responsibility between groups is divided by queue type (or event class).
Integer from 1 to 9999999.

order

int

required

The order of a role instance within a group.
Defines in what order the flow in the mode will take place Active-Passive.

mnesia_storage_mode

str

disc "Mode of operation of object storage.

Possible options:

* disc - full mode

in RAM with saving to disk on all instances of the group.

  • ram - only in RAM (with support for distributed

transactional). If all instances of the group are rebooted/shut down simultaneously

Configuration example

The configuration is managed in an application available to master domain administrators. The application hides the full content of the configuration, but it is nevertheless accessible via the API.

The configuration contains a section to describe all instances of all roles. Parameters are defined for each specific role instance.

Example node
{
  "name": "broker1",
  "roletype": "broker",
  "iface": "eth0",

  "group": 11400,
  "order": 1
}

See also