All Products
Search
Document Center

ApsaraDB for OceanBase:Create a RocketMQ data source

Last Updated:Dec 29, 2025

You must configure data sources before you create a data migration or synchronization task. This topic describes how to create a RocketMQ data source by using the data transmission service.

Security risks

You can choose to automatically or manually add public CIDR blocks for the data transmission service, but security risks exist. Your use of the data transmission service indicates that you have understood and acknowledged the possible security risks. You must take basic security protection measures, such as setting a complex password for your account, limiting the open port numbers of CIDR blocks, enabling authentication for communication among internal APIs, and regularly checking for and limiting CIDR blocks that are not required.

The data transmission service will add or delete the CIDR blocks automatically added to a whitelist or security group based on business needs and security risks. Do not use the CIDR blocks in a whitelist or security group for business needs other than the data transmission service. If you use such CIDR blocks for other business needs, the issues thus incurred are beyond the guarantee scope of the SLA of the data transmission service. For more information about how to add an IP address to a whitelist or security group for the data transmission service, see Add a whitelist.

Prerequisites

  • The data transmission service has the privilege to access cloud resources. For more information, see Grant privileges to roles for data transmission.

  • You have created a group in the RocketMQ instance. For more information, see Create a group.

  • You have created a topic named oms_test_topic in the RocketMQ instance.

  • You have enabled Authentication-free in VPCs for the Intelligent Authentication access control type in the RocketMQ instance.

    Intelligent Authentication is the default access control type for RocketMQ instances. In this mode, a client that connects to a RocketMQ instance in a VPC is authenticated by default. If Authentication-free in VPCs is disabled, the username and password of the RocketMQ instance are required for the VPC endpoint to pass the data source connection test.

Limitations

The data transmission service supports RocketMQ instances of versions 4.x and 5.x, including the commercial and community editions.

Procedure

  1. Log on to the

    ApsaraDB for OceanBase console.

  2. In the left-side navigation pane, choose Data Transmission > Data Source Management.

  3. In the Data Sources section, click New Data Source in the upper-right corner.

  4. In the New Data Source dialog box, select RocketMQ for Data Source Type.

  5. Configure the parameters.

    Parameter

    Description

    Instance Type

    At present, only the Alibaba Cloud RocketMQ Instance option is supported.

    Data Source Identifier

    We recommend that you set it to a combination of digits and letters. It must not contain any spaces and cannot exceed 32 characters in length.

    Cross Alibaba Cloud Account

    The data transmission service allows you to configure a task to migrate or synchronize data between instances under different Alibaba Cloud accounts.

    You can choose whether to select this option based on business needs. If you select this option, enter the Alibaba Cloud account of the target instance. If you do not have permissions on this Alibaba Cloud account, request for authorization first. For more information, see Apply for cross-account authorization.

    Instances

    The data source. You can select an Alibaba Cloud RocketMQ instance from the drop-down list.

    RocketMQ Endpoint Information

    The endpoint of the RocketMQ database, which is in the format of IP address:port number or domain name:port number.

    AccessKey

    The AccessKey ID that you created in the Resource Access Management (RAM) console for identity authentication.

    You can hover over the user avatar in the upper-right corner of the page and click AccessKey Management to view the AccessKey ID.

    SecretKey

    The AccessKey secret that you created in the RAM console for identity authentication.

    The AccessKey secret is displayed only once when you first create it. You cannot retrieve the AccessKey secret if you forget it. We recommend that you save the AccessKey secret for subsequent use. For more information, see Create an AccessKey pair.

    Remarks (Optional)

    The additional information about the data source.

  6. Click Test Connection to test the network connection between the data transmission system and the source database.

    Important

    If you do not create the oms_test_topic topic, the test will fail.

  7. After the test is passed, click OK.

Create a group

Before creating a RocketMQ data source, you need to create defaultGroup in advance. Otherwise, the test connection fails.

  1. Go to the details page of the RocketMQ instance.

    1. Log on to the Message Queue for Apache RocketMQ console.

    2. In the left-side navigation pane, click Instances.

    3. In the instance list, click the name of the target instance. The Instances page appears.

  2. In the left-side navigation pane, click Groups.

  3. On the Groups page, click Create Group and set the parameters.

    The parameters vary with the version of the RocketMQ instance. For more information, see Manage groups.

    Important

    When you create a group, the group ID must be set to defaultGroup.

  4. After you configure the parameters, click OK.

  5. Create a topic named oms_test_topic.

    1. On the instance details page, click Topics in the left-side navigation pane.

    2. On the Topics page, click Create Topic.

    3. In the Create Topic dialog box, configure the parameters.

      Parameter

      Description

      Name

      Set this parameter to oms_test_topic.

      Billing Method

      This parameter is available only for RocketMQ instances of version 4.x, and supports Pay-as-you-go only.

      Message Type

      • RocketMQ instances of version 4.x support Normal Message, Transactional Message, Partitionally Ordered Message, Globally Ordered Message and Scheduled/Delayed Message.

      • RocketMQ instances of version 5.x support Normal Message, Ordered Message, Scheduled/Delayed Message, and Transactional Message.

      Description

      It can contain a maximum of 128 characters.

    4. After you configure the parameters, click OK.