You must activate Message Queue for Apache RocketMQ on the Alibaba Cloud official website before you can use the service. If your account is a Resource Access Management (RAM) user, you must grant permissions to the RAM user before you can use the console or API to access the corresponding resources in Message Queue for Apache RocketMQ and use the resources to send and consume messages by using SDKs.

Prerequisites

An Alibaba Cloud account is created, and real-name verification is complete. For more information, see Sign up with Alibaba Cloud.

Step 1: Activate Message Queue for Apache RocketMQ

  1. Log on to the Message Queue for Apache RocketMQ console.
  2. In the dialog box that appears, click Activate Message Queue >>.
  3. On the service activation page, select Message Queue (MQ) Terms of Service, and then click Activate Now.

Step 2: (Required for RAM users) Grant permissions to a RAM user

  1. Log on to the RAM console by using your Alibaba Cloud account.
  2. In the left-side navigation pane, choose Identities > Users.
  3. On the Users page, find the RAM user to which you want to attach the custom policy, and click Add Permissions in the Actions column.
  4. In the Add Permissions panel, grant permissions to the RAM user.
    1. Select the authorization scope.
      • Alibaba Cloud Account: The authorization takes effect on the current Alibaba Cloud account.
      • Specific Resource Group: The authorization takes effect in a specific resource group.
        Note If you select Specific Resource Group for Authorized Scope, make sure that the required cloud service supports resource groups. For more information, see Services that work with Resource Group.
    2. Specify the principal.
      The principal is the RAM user to which you want to grant permissions. By default, the current RAM user is specified. You can also specify another RAM user.
    3. Select policies.
      Note You can attach a maximum of five policies to a RAM user at a time. If you want to attach more than five policies to a RAM user, perform the operation multiple times.
  5. Click OK.
  6. Click Complete.

Message Queue for Apache RocketMQ provides the following system policies. You can grant related permissions to a RAM user based on the permission scope.

Policy Description
AliyunMQFullAccess The permissions that are required to manage Message Queue for Apache RocketMQ. This policy grants permissions that are equivalent to the permissions of an Alibaba Cloud account. RAM users to whom this policy is attached have permissions to perform all actions in the console and send and subscribe to messages.
AliyunMQPubOnlyAccess The permissions that allow users of Message Queue for Apache RocketMQ to send messages. RAM users to whom this policy is attached have the permissions to use all resources of an Alibaba Cloud account to send messages by using SDKs.
AliyunMQSubOnlyAccess The permissions that allow users of Message Queue for Apache RocketMQ to subscribe to messages. RAM users to whom this policy is attached have the permissions to use all resources of an Alibaba Cloud account to subscribe to messages by using SDKs.
AliyunMQReadOnlyAccess The permissions that allow users of Message Queue for Apache RocketMQ to only read the information about resources. RAM users to whom this policy is attached have the permissions to only read the information about the resources of an Alibaba Cloud account in the console or by calling API operations.
Note System policies provide a wide scope of permissions. For example, a RAM user to which the AliyunMQFullAccess policy is attached can manage all resources of Message Queue for Apache RocketMQ. Message Queue for Apache RocketMQ provides custom policies to allow you to implement fine-grained permission management on a specific type of resource. For example, you can grant a RAM user only the permissions to use the console to manage topics. For more information about custom policies, see Policies and examples.

What to do next

You can click Console to create resources. For more information, see Create resources.