Updated on 2024-11-14 GMT+08:00

Buying a RocketMQ Instance

RocketMQ instances are physically isolated and exclusively occupied by each tenant. You can customize specifications and storage space of a RocketMQ instance as required.

Preparing Required Resources

Before purchasing a RocketMQ instance, prepare the required resources, including a virtual private cloud (VPC), subnet, and security group with proper rules. Each RocketMQ instance is deployed in a VPC and bound to a specific subnet and security group, which provide an isolated virtual network environment and allow you to easily configure and manage security protection policies.

Table 1 lists the resources required by a RocketMQ instance.

Table 1 RocketMQ resources

Resource

Requirement

Operations

VPC and subnet

Configure the VPC and subnet for RocketMQ instances as required. You can use the current account's existing VPC and subnet or shared ones, or create new ones.

VPC owners can share the subnets in a VPC with one or multiple accounts through Resource Access Manager (RAM). Through VPC sharing, you can easily configure, operate, and manage multiple accounts' resources at low costs. For more information about VPC and subnet sharing, see VPC Sharing.

Note the following when creating a VPC and a subnet:

  • The VPC and the RocketMQ instance must be in the same region.
  • Use the default settings when creating a VPC and subnet.

For details on how to create a VPC and subnet, see Creating a VPC. If you need to create and use a new subnet in an existing VPC, see Creating a Subnet for the VPC.

Security group

Different RocketMQ instances can use the same security group or different security groups.

To use RocketMQ instances, add the security group rules described in Table 2 or Table 3. You can also add other rules as required.

NOTE:

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.

For details on how to create a security group, see Creating a Security Group. For details on how to add rules to a security group, see Adding a Security Group Rule.

EIP

This parameter is required to enable public access.

Note the following when creating EIPs:

  • The EIPs must be created in the same region as the RocketMQ instance.
  • The RocketMQ console cannot identify IPv6 EIPs.

For details about how to create an EIP, see Assigning an EIP.

Table 2 Security group rules (RocketMQ 4.8.0)

Direction

Protocol

Port

Source

Description

Inbound

TCP

8100

IP address or IP address range of the RocketMQ client

The port is used for private network access to metadata nodes using TCP.

Inbound

TCP

8200

The port is used for public network access to metadata nodes using TCP.

Inbound

TCP

10100-10199

The port is used for accessing service nodes using TCP.

Table 3 Security group rules (RocketMQ 5.x)

Direction

Protocol

Port

Source

Description

Inbound

TCP

8100

IP address or IP address range of the RocketMQ client

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

Inbound

TCP

8200

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

Inbound

TCP

10100-10199

The port is used for accessing service nodes using TCP.

Inbound

TCP

8080

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

Inbound

TCP

8081

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

Authorizing RocketMQ

This operation is required to enable IPv6 for RocketMQ 4.8.0 instances in the CN East2 region.

Before creating a RocketMQ instance, grant the permissions to the required cloud resources.

  1. Log in to the console.
  2. Click in the upper left corner to select a region.
  3. Click and choose Middleware > Distributed Message Service for RocketMQ to open the console of DMS for RocketMQ.
  4. Choose Global Configurations > Service Authorization.
  5. Check VPC and click Update Authorization.
  6. Once the operation succeeds, agency dms_admin_trust is created in IAM.
    • Perform this operation as the user or sub-user in the admin user group.
    • Once the dms_admin_trust is created, do not modify or delete it.

Buying a RocketMQ Instance

  1. Go to the Buy Instance page.
  2. Select Billing Mode.

    • Yearly/Monthly: To create an instance, determine how long you would like to use it and it will be billed at the current price immediately.
    • Pay-per-use: To create an instance, there is no need to specify a subscription because the instance will be billed based on usage duration.

  3. Select a Region.

    DMS for RocketMQ instances in different regions cannot communicate with each other over an intranet. Select a nearest location for low latency and fast access.

  4. Select a Project.

    Projects isolate compute, storage, and network resources across geographical regions. For each region, a preset project is available.

  5. Select an AZ.

    An AZ is a physical region where resources use independent power supply and networks. AZs are physically isolated but interconnected through an internal network.

    Select AZs as prompted based on the instance version.

  6. Enter an Instance Name.

    You can customize a name that complies with the rules: 4–64 characters; starts with a letter; can contain only letters, digits, hyphens (-), and underscores (_).

  7. Select an Enterprise Project.

    This parameter is for enterprise users. An enterprise project manages cloud resources. The enterprise project management service unifies cloud resources in projects, and resources and members in a project. The default project is default.

  8. Configure the following instance parameters:

    • Retain Default for Specifications. If you select 4.8.0, specify the flavor, broker quantity, and broker storage space as required.
      • Architecture: Currently, only cluster instances are supported.
      • CPU Architecture: Currently, only x86 architecture is supported.
      • Broker Flavor: Select the required flavor.
      • Brokers: Select the required number of brokers.
      • Storage Space per Broker: Specify the disk type and storage space of each broker.

        The disk type can be high I/O, ultra-high I/O, General-Purpose SSD, or Extreme SSD. For details on how to select a disk type, see Disk Types and Disk Performance.

        High I/O disks are recommended for RocketMQ instances in test environments. General-Purpose SSD and higher disks are recommended for RocketMQ instances in production environments.

      Figure 1 Default specifications (RocketMQ 4.8.0)
    • Retain Default for Specifications. If you select 5.x, specify the flavor and storage space as required.
      • Instance Type: Currently, only the basic edition is supported.
      • Architecture: Select Single-node or Cluster.
        • Single-node deployment does not support high availability. The single-node architecture of the basic edition can only be used for testing.
        • Cluster deployment supports high availability and anti-affinity.
      • CPU Architecture: Currently, only x86 architecture is supported.
      • Flavor: Select the required flavor.
      • Storage Space: Disk type and total storage space of the instance.

        The disk type can be high I/O, ultra-high I/O, General-Purpose SSD, or Extreme SSD. For details on how to select a disk type, see Disk Types and Disk Performance.

        High I/O disks are recommended for RocketMQ instances in test environments. General-Purpose SSD and higher disks are recommended for RocketMQ instances in production environments.

    • If you select Custom (available only in v4.8.0), the system calculates the number of brokers and broker storage space for different flavors based on your specified number of topics, peak creation TPS, peak retrieval TPS, average message size, and number of messages created every day. You can select one of the recommended flavors as required.
      Figure 2 Specification calculation

  9. Configure the instance network parameters.

    1. Select the created or shared VPC and subnet from the VPC drop-down list.

      A VPC provides an isolated virtual network for your RocketMQ instances. You can configure and manage the network.

      After the RocketMQ instance is created, its VPC and subnet cannot be changed.

    2. Set IPv6.

      This parameter is displayed only when an IPv6-supported subnet is selected. When IPv6 is enabled, the instance can be accessed over an IPv6 private network on a client.

      • This function is available only in the CN East2 region. IPv6 instances can be created only in v4.8.0.
      • The IPv6 setting is fixed once the instance is created.
      • Accessing an instance over an IPv6 private network uses a VPC endpoint, which will incur fees. For details, see Billing.
    3. Select a security group.

      A security group is a set of rules for accessing a RocketMQ instance.

  10. Configure SSL.

    • SSL: Ciphertext access with high security, but lower performance.
    • PLAINTEXT: Plaintext access with high performance, but lower security.
    • PERMISSIVE: Both ciphertext and plaintext access, depending on the client.

    The SSL setting can be changed after the instance is created. Select a transmission mode as required.

  11. Configure ACL.

    After ACL is enabled, the permissions for each user are exclusive.

  12. Select the required duration.

    This parameter is displayed only if the billing mode is yearly/monthly.

  13. Click More Settings to configure more parameters.

    • Configure Public Access.

      Public access is disabled by default. You can enable or disable it as required. After public access is enabled, configure an IPv4 EIP for the RocketMQ instance.

    • Specify tags.

      Tags are used to identify cloud resources. When you have many cloud resources of the same type, you can use tags to classify cloud resources by dimension (for example, usage, owner, or environment).

      If your organization has configured tag policies for DMS for RocketMQ, add tags to RocketMQ instances based on the tag policies. If a tag does not comply with the tag policies, RocketMQ instance creation may fail. Contact your organization administrator to learn more about tag policies.

      • If you have created predefined tags, select a predefined pair of tag key and value. To view or create predefined tags, click View predefined tags on the right. You will then be directed to the TMS console.
      • You can also create new tags by entering Tag key and Tag value.

      Up to 20 tags can be added to each RocketMQ instance. For details about the requirements on tags, see Configuring Tags for a RocketMQ Instance.

    • Enter a description of the instance.

  14. Click Buy.
  15. Confirm the instance information, and read and agree to the HUAWEI CLOUD Customer Agreement. If you have selected the yearly/monthly billing mode, click Pay Now and make the payment as prompted. If you have selected the pay-per-use mode, click Submit.
  16. Return to the instance list and check whether the instance has been created.

    It takes 3 to 15 minutes to create an instance. During this period, the instance status is Creating.

    • If the instance is created successfully, its status changes to Running.
    • If the instance is in the Creation failed state, delete it by referring to Deleting a RocketMQ Instance and then create a new one. If the instance creation fails again, contact customer service.