RabbitMQ Shovel Transport¶
Shovels are RabbitMQ implementation of the Message Transfer concept described earlier. It allows to connect two endpoints in different brokers and route messages through them.
Shovels are enabled with the shovel plugin for rabbitmq and configured by Replication via its exposed rest API.
- The shovel plugins runs on the hub only, not on satellites.
- Shovels are created only on the hub, two shovels per satellite
- A shovel hub to satellite
- A Shovel satellite to hub
Networking¶
- The Hub's rabbitmq instance must be able to reach all satellites on AMQPS protocol port 5671, bidirectional.
-
A DNS record is usually used (instead of IP addresses) so that a certificate, signed by a wellknown authority, can be issued for that domain name.
-
The shovel plugin (running only on the hub) will send/receive traffic from/to the hub's rabbitmq instance locally, in-cluster traffic.
- No AMQPS is enabled on the hub's broker.
- The satellites do not need to reach the hub's rabbitmq instance; it is the hub who sends/receives all packets.
- The shovel plugin (running only on the hub) will send/receive traffic from/to each satellite's rabbitmq instance using each satellite's AMQPS listener. This is traffic is encrypted.
TLS Configuration¶
To enable TLS for the shovels, first we need to enable TLS on each satellite's rabbitmq instance. Usually, internal cluster traffic uses the AMQP listener, and external (aka shovels) use the AMQPS listener.
Only the satellites needs to have TLS enabled on the broker, hence certificates are only required for the satellites.
- A certificate is required for each satellite's Rabbitmq instance to enable
the AMQPS listener
- A single certificate can be used for all satellites using multiple SANs
- The hub must have access to the certificates of all satellites, public and
private keys.
- The hub's rabbitmq instance needs to have these certificates mounted.
- The hub must have the CA certificate (public key) used to sign the
satellite's certificates.
- The hub's rabbitmq instance needs to have the CA mounted.
TLS Shovel URIs¶
Once TLS is in place for the satellites, the Replication Shovel URIs on the hub need to be updated to reference the satellite's certificates and enable peer verification.
Text Only | |
---|---|
For example, using break lines to clean it up: