Configure MQ

Updated at:

The message queue (MQ) configuration allows you to use Message Queue for Apache RocketMQ to subscribe to messages of Cloud Electronic Shelf Label (CloudESL).

Prerequisites

Message Queue for Apache RocketMQ is activated, and a Message Queue for Apache RocketMQ instance is created.

Configure permissions

  1. Create a RAM role named CloudEslNotificationRole in the RAM console. In the Configure Role step, select Other Alibaba Cloud Account as the trusted account and enter the ID of the Alibaba Cloud account to which you want to attach the role. This way, CloudESL can use the Alibaba Cloud account to deliver messages to Message Queue for Apache RocketMQ. Confirm the account ID with the technical support.

  2. After the RAM role CloudEslNotificationRole is created, verify that the RAM role appears on the Roles page.

  3. Click the RAM role to go to the role details page. Click Grant Permission to grant the RAM role the permissions to deliver messages to Message Queue for Apache RocketMQ.

In the Grant Permission panel, attach the AliyunMQPubOnlyAccess policy to the RAM role.

Obtain MQ information from Message Queue for Apache RocketMQ

Obtain key MQ information in the Message Queue for Apache RocketMQ console.

  1. Obtain the topic information.

    CloudESL delivers messages to a topic in Message Queue for Apache RocketMQ. For more information, see Manage topics.

  2. Obtain the group ID.

    CloudESL uses the group ID to deliver messages. For more information, see Manage groups.

  3. Obtain the MQ endpoint.

    On the Instance Details page, obtain the TCP endpoint of the instance.

Configure MQ information in CloudESL

  1. In the CloudESL console, choose System Management > MQ Configuration in the left-side navigation pane.

  2. On the MQ Configuration page, click Configure.

  3. In the MQ Configuration dialog box, configure the parameters based on the information obtained from Message Queue for Apache RocketMQ.

  4. Click Send Test Message to verify that the configuration is valid.

Important

After the configuration is complete, click Send Test Message on the MQ Configuration page to verify that the configuration is valid.

Parameter

Description

Message Topic

The topic that is configured in Message Queue for Apache RocketMQ.

Message Group ID

The group ID that is configured in Message Queue for Apache RocketMQ.

MQ Endpoint

The TCP endpoint of the Message Queue for Apache RocketMQ instance.

Message Tag

The custom tag that allows consumers to identify the messages.

Subscribe to messages

For more information about the format and content of messages that are delivered by CloudESL, see Subscribe to event messages by using MQ configurations.