All Products
Search
Document Center

ApsaraMQ for Kafka:Create ApsaraMQ for RabbitMQ source connectors

Last Updated:Dec 08, 2025

This topic describes how to create a source connector in the ApsaraMQ for Kafka console to synchronize data from ApsaraMQ for RabbitMQ to ApsaraMQ for Kafka.

Prerequisites

Create a source connector

  1. Log on to the ApsaraMQ for Kafka console. In the Resource Distribution section of the Overview page, select the region where the ApsaraMQ for Kafka instance that you want to manage resides.

  2. In the left-side navigation pane, choose Connector Ecosystem Integration > Tasks.

  3. On the Tasks page, click Create Task.

  4. On the Create Task page, configure the Task Name and Description parameters and follow the on-screen instructions to configure other parameters. Then, click Save. The following section describes the parameters:

    • Task Creation

      1. In the Source step, set the Data Provider parameter to ApsaraMQ for RabbitMQ and follow the on-screen instructions to configure other parameters. Then, click Next Step. The following table describes the parameters.

        Parameter

        Description

        Example

        Region

        The region where the source ApsaraMQ for RabbitMQ instance resides.

        China (Hangzhou)

        ApsaraMQ for RabbitMQ Instance

        The ApsaraMQ for RabbitMQ instance on which the messages that you want to route are produced.

        amqp-cn-7pp2mwbc****

        Vhost

        The vhost of the source ApsaraMQ for RabbitMQ instance.

        test

        Queue

        The queue in which the messages that you want to route are stored.

        test

        Messages

        This is an Advanced Settings parameter. The maximum number of messages that can be sent in each function invocation. Requests are sent only when the number of messages in the backlog reaches the specified value. Valid values: 1 to 10000.

        100

        Interval (Unit: Seconds)

        This is an Advanced Settings parameter. The time interval at which the function is invoked. The system sends the aggregated messages to Function Compute at the specified time interval. Valid values: 0 to 15. Unit: seconds. The value 0 specifies that messages are sent immediately after aggregation.

        3

      2. In the Filtering step, define a data pattern in the Pattern Content code editor to filter data. For more information, see Event patterns.

      3. In the Transformation step, specify a data cleansing method to implement data splitting, mapping, enrichment, and routing capabilities. For more information, see Use Function Compute to perform message cleansing.

      4. In the Sink step, set the Service Type parameter to ApsaraMQ for Kafka and follow the on-screen instructions to configure other parameters. The following table describes the parameters.

        Parameter

        Description

        Example

        Instance ID

        The ID of the ApsaraMQ for Kafka instance that you created.

        test

        Topic

        The topic on the ApsaraMQ for Kafka instance that you created.

        test

        Acknowledgment Mode

        The mode in which the ApsaraMQ for Kafka instance sends an acknowledgment (ACK) to a client after a message is received. Valid values:

        • None

        • LeaderOnly

        • All

        None

        Message Value

        EventBridge extracts data from a message by using JSONPath and routes the specified content of the message to the target.

        • Complete Data

        • Data Extraction

        • Fixed Value

        • Template

        Data Extraction

        $.data.value

        Message Key

        EventBridge extracts data from a message by using JSONPath and routes the specified content of the message to the target.

        • Empty

        • Data Extraction

        • Fixed Value

        • Template

        Data Extraction

        $.data.key
    • Task Property

      Configure the retry policy that is used when events fail to be pushed and the method that is used to handle errors. For more information, see Retry policies and dead-letter queues.

  5. Go back to the Tasks page, find the ApsaraMQ for RabbitMQ source connector that you created, and then click Enable in the Actions column.

  6. In the Note message, click OK.

    The connector requires 30 to 60 seconds to be enabled. You can view the progress in the Status column on the Tasks page.

Other operations

On the Tasks page, find the source connector that you want to manage and perform other operations in the Actions column.

  • View the details of the connector: Click Details in the Actions column. On the Task Details page, view the basic information, properties, and monitoring metrics of the connector.

  • Modify the configurations of the connector: Click Edit in the Actions column. In the Edit Task panel, change the details and properties of the connector.

  • Enable or disable the connector: Click Enable or Pause in the Actions column. In the Note message, click OK.

  • Delete the connector: Click Delete in the Actions column. In the Note message, click OK.