RabbitMQ Exchanges Test

Messages are not published directly to a queue, instead, the producer sends messages to an exchange. An exchange is responsible for the routing of the messages to the different queues. An exchange accepts messages from the producer application and routes them to message queues with the help of bindings and routing keys.

To understand the load on each exchange and measure the ability of the exchange to process the load, use the RabbitMQ Exchanges test. This test auto-discovers the exchanges in a cluster and reports how quickly each exchange sends out the messages it receives from producers/publishers to queues. In the process, the test points to those exchanges that are unable to route messages to queues as fast as they receive them.

Target of the test : A RabbitMQ Cluster

Agent deploying the test : A remote agent

Outputs of the test : One set of results for each exchange

Configurable parameters for the test
Parameters Description

Test period

How often should the test be executed

Host

The host for which the test is to be configured.

Port

The port at which the configured Host listens; by default, this is 15672

Username, Password, and Confirm Password

The eG agent connects to the Management Interface of the rabbitmq-management plugin of the target node, and runs HTTP-based API commands on the node using the plugin to pull metrics of interest. To connect to the plugin and run the API commands, the eG agent requires the privileges of a user on the cluster who has been assigned the 'monitoring' tag. If such a user pre-exists, then configure this test with the Username and Password of that user. On the other hand, if no such user exists, then you will have to create a user for this purpose using the Management Interface. The steps for this have been detailed in How Does eG Enterprise Monitor a RabbitMQ Cluster? In this case, make sure you configure this test with the Username and Password of the new user. Finally, confirm the password by retyping it in the Confirm Password text box.

SSL

By default, this flag is set to No, as the target node is not SSL-enabled by default. If the node is SSL-enabled, then set this flag to Yes.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Type

Indicates the type of this exchange.

 

An exchange can be of one of the following types:

  • Direct: A direct exchange delivers messages to queues based on a message routing key. In a direct exchange, the message is routed to the queues whose binding key exactly matches the routing key of the message. If the queue is bound to the exchange with the binding key pdfprocess, a message published to the exchange with a routing key pdfprocess will be routed to that queue.
  • Fanout: A fanout exchange routes messages to all of the queues that are bound to it.
  • Topic: The topic exchange does a wildcard match between the routing key and the routing pattern specified in the binding.
  • Headers: Headers exchanges use the message header attributes for routing.

The values that this measure can take and their corresponding numeric values are as follows:

Measure Value

Numeric Value

Direct

1

Fanout

2

Headers

3

Topic

4

Note:

This test reports the Measure Values listed in the table above to indicate the exchange type. In the graph of this measure however, the same will be represented using the numeric equivalents.

Features

Indicates the features of this exchange.

 

The value of this measure can be any of the following:

Measure Value Numeric Value

Durable

0

Internal

1

Durable, Internal

10

Durable exchanges will survive server restarts and will last until they are explicitly deleted. The setting called "Internal" is for exchanges that do not have an external client connecting to them.

Note:

This test reports the Measure Values listed in the table above to indicate the exchange features. In the graph of this measure however, the same will be represented using the numeric equivalents.

Published in

Indicates the rate at which messages are published into this exchange.

Messages/Sec

 

Published out

Indicates the rate at which this exchange sends messages out to queues.

Messages/Sec

If the value of the Published in measure is abnormally higher than the value of the Published out measure, it implies that the corresponding exchange does not have the processing power to process all the messages that come into it..