Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Message Bus is a publish-subscribe message brokering system implemented with RabbitMQ which uses AMQP, an open standard for message-orientated middleware, over TCP.

Message Handling

The Message Bus handles the data it receives (e.g. raw event data, new alerts, Situation activity etc) by placing it in queues, which are lines of messages waiting to be handled.

...

Once the maximum number of messages has been reached, the broker drops messages from the front of the queue to make room for new messages. By default, Moogsoft AIOps applications use exclusive transient queues. For example, if Moogsoft AIOps or the broker shuts down or dies then the queue and all of its messages are lost. Durable queues can be enabled using the message_persistence setting in $MOOGSOFT_HOME/config/system.conf (see Message Persistence).

For more information see the RabbitMQ docs on queues and queue length.

Default Configuration

By default, Moogsoft AIOps installs with a single RabbitMQ broker running on the same machine as the other components (LAMs, Moogfarmd, the Moolets, etc.).

The out-of-the-box configuration in $MOOGSOFT_HOME/config/system.conf is as follows:

Code Block
languagetext
port: 5672
zone: <none>
username: moogsoft
password: m00gs0ft

The username and password always need to match the Message Bus broker configuration. If commented out, a default "guest" user will be used (guest: guest).

Zones

You can use zones, or virtual hosts, to share a single RabbitMQ broker cluster among multiple instances of Moogsoft AIOps. 

...

For distributed installations using multiple RabbitMQ brokers, this must be configured. A zone (vhost) name is required by the moog-init.sh setup script. See Message System Deployment.

Anchor
msgpersist
msgpersist
Message Persistence

You can control and minimize message loss during a shutdown or failure using the following settings in $MOOGSOFT_HOM/config/system.conf:

message_persistence

Controls whether the Message Bus persists important messages in the event of an application or message broker restart. This affects how the Message Bus handles messages.

Type: Boolean

Default: false

max_retries

The number of attempts to re-send a failed message, used in conjunction with retry_interval.

Type: Number
Default: 100

retry_interval

The time to wait in milliseconds between each resend attempt. The combination of 100 retries and a 200 msec retry_interval gives a total of 20 seconds, which is typical duration for broker failover in a high availability environment.

Type: Number
Default: 200

cache_on_failure

Controls whether the message is cached internally and resent. If enabled, a message is cached is an initial retry, controlled by max_retry and retry_interval, is a failure. 

Type: Boolean
Default: false

cache_ttl

Specifies how many seconds a cached message lives in the cache list. The system attempts to resend any cached messages in the order in which they were put on the cache until their cache time-to-live (cache_ttl) value has been reached. Any messages not sent successfully sent is discarded. This value has a direct impact on sender process memory.

Type: Number
Default: 900

confirmation_timeout

Defines the time to wait for confirmation from a RabbitMQ Broker that it has received the sent message.

...