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

RocketMQ Network Connection Conditions

A client can connect to a RocketMQ instance over a public or private network. Notes before using a private network:

  • By default, a client and a RocketMQ 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 lists how a client can connect to a RocketMQ instance.

Table 1 Connection modes

Mode

How To Do

Reference

Public access

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

Configuring Public Access for a RocketMQ Instance

Private access

A client and a RocketMQ instance are interconnected when they are deployed in a VPC.

-

When a client and a RocketMQ 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 RocketMQ 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 RocketMQ instance within a VPC, and do not need to add rules according to Table 2 or Table 3.

Table 2 Security group rules (RocketMQ 4.8.0)

Direction

Protocol

Port

Source

Description

Inbound

TCP

8100

0.0.0.0/0

The port is used for private access to metadata nodes.

Inbound

TCP

8200

0.0.0.0/0

The port is used for public access to metadata nodes.

Inbound

TCP

10100–10199

0.0.0.0/0

The port is used for accessing service nodes.

Table 3 Security group rules (RocketMQ 5.x)

Direction

Protocol

Port

Source

Description

Inbound

TCP

8100

0.0.0.0/0

The port is used for private access to instances using TCP.

Inbound

TCP

8200

0.0.0.0/0

The port is used for public access to instances using TCP.

Inbound

TCP

10100–10199

0.0.0.0/0

The port is used for access to service nodes using TCP.

Inbound

TCP

8080

0.0.0.0/0

The port is used for private access to instances using gRPC.

Inbound

TCP

8081

0.0.0.0/0

The port is used for public access to instances using gRPC.