Updated on 2024-10-30 GMT+08:00

RabbitMQ Network Connection Requirements

A client can connect to a RabbitMQ instance in public or private networks. Notes before using a private network:

  • By default, a client and a RabbitMQ instance are interconnected when they are deployed in a VPC.
  • If they are not, you need to interconnect them because of isolation among VPCs.
Table 1 Connection modes

Mode

How To Do

Reference

Public access

Enable public access on the RabbitMQ console and configure elastic IPs (EIPs). The client can connect to the RabbitMQ instance through EIPs.

Configuring RabbitMQ Public Access

Private access

By default, a client and a RabbitMQ instance are interconnected when they are deployed in a VPC.

-

When a client and a RabbitMQ instance are deployed in different VPCs of the same region, interconnect two VPCs using a VPC peering connection.

VPC Peering Connection

Before connecting a client to a RabbitMQ instance, allow accesses for the following security groups.

After a security group is created, its default inbound rule allows communication among ECSs within the security group and its default outbound rule allows all outbound traffic. In this case, you can access a RabbitMQ instance within a VPC, and do not need to add rules according to Table 2.

Table 2 Security group rules

Direction

Type

Protocol

Port

Source

Description

Inbound

IPv4

TCP

5672

IP address or IP address group of the RabbitMQ client

Accessing a RabbitMQ instance at an IPv4 address on a client (without SSL)

Inbound

IPv4

TCP

5671

IP address or IP address group of the RabbitMQ client

Accessing a RabbitMQ instance at an IPv4 address on a client (with SSL)

Inbound

IPv4

TCP

15672

IP address or IP address group of the RabbitMQ client

Accessing the management UI (without SSL)

Inbound

IPv4

TCP

15671

IP address or IP address group of the RabbitMQ client

Accessing the management UI (with SSL)