What client versions are ApsaraMQ for RocketMQ 5.0 instances compatible with?
How do I enable the Internet access feature for ApsaraMQ for RocketMQ instances?
What are the differences between ordered messages and normal messages?
How do I obtain the credentials that are required to connect to an ApsaraMQ for RocketMQ broker?
How do I obtain the endpoint that is used to connect to an ApsaraMQ for RocketMQ broker?
What limits are imposed on the number of tags to which I can subscribe in ApsaraMQ for RocketMQ?
How are messages consumed in a topic to which multiple consumer groups subscribe?
What is the maximum size of a message body in ApsaraMQ for RocketMQ?
What is the retention period for messages in ApsaraMQ for RocketMQ?
What load balancing policies are provided by ApsaraMQ for RocketMQ?
Are messages delivered again after they fail to be consumed?
Is the broadcasting consumption mode supported by ApsaraMQ for RocketMQ 5.0 instances?
Do I need to attach disks to an ApsaraMQ for RocketMQ instance for storage?
What are the advantages of ApsaraMQ for RocketMQ 5.0 instances over ApsaraMQ for RocketMQ 4.0 instances?
Compared with earlier versions of instances, ApsaraMQ for RocketMQ 5.0 instances feature a more advanced architecture, easier development, easier O&M, more flexible costs, and a wider choice of instance types. For more information, see Differences between ApsaraMQ for RocketMQ 4.x and 5.x and compatibility description.
What client versions are ApsaraMQ for RocketMQ 5.0 instances compatible with?
ApsaraMQ for RocketMQ 5.0 instances are compatible with Apache RocketMQ 3.x, 4.x, and 5.x clients and ApsaraMQ for RocketMQ 1.x TCP clients. For more information, see Differences between ApsaraMQ for RocketMQ 4.x and 5.x and compatibility description.
What SDKs do ApsaraMQ for RocketMQ instances support?
ApsaraMQ for RocketMQ 5.0 instances: TCP client SDKs for Java, C, C++, C#, and Go. For more information, see Overview.
ApsaraMQ for RocketMQ 4.0 instances: TCP client SDKs for Java, C, C#, and .NET, and HTTP client SDKs for Java, Go, Python, Node.js, PHP, C#, and C++. For more information, see Overview.
How do I enable the Internet access feature for ApsaraMQ for RocketMQ instances?
ApsaraMQ for RocketMQ 5.0 instances: You can enable the Internet access feature by using one of the following methods: 1. Enable the feature on the buy page when you purchase the instance. 2. Enable the feature when you upgrade the instance. For information about the billing of the Internet access feature of ApsaraMQ for RocketMQ 5.0 instances, see Internet access fees.
ApsaraMQ for RocketMQ 4.0 instances: By default, public endpoints are supported. You do not need to manually configure the Internet access feature. For information about the billing of the Internet access feature of ApsaraMQ for RocketMQ 4.0 instances, see Billing of Internet traffic.
You can obtain the public endpoint of an ApsaraMQ for RocketMQ instance on the Instance Details page in the ApsaraMQ for RocketMQ console.
What are the differences between ordered messages and normal messages?
Normal messages are not necessarily consumed in the same order as they are produced.
Ordered messages are partitioned based on sharding keys. Messages in each partition are consumed in first in, first out (FIFO) order. Only messages in the same partition are consumed in FIFO order. Messages across partitions are not strictly bound to this order. For more information, see Ordered messages.
How do I obtain the credentials that are required to connect to an ApsaraMQ for RocketMQ broker?
If you want to access an ApsaraMQ for RocketMQ 5.0 instance, you must specify the username and password of the instance. Sample code:
/** * If you use the public endpoint to access the ApsaraMQ for RocketMQ instance, you must specify the username and password of the instance. You can obtain the username and password on the Intelligent Authentication tab of the Access Control page corresponding to the instance in the ApsaraMQ for RocketMQ console. * If the client of the ApsaraMQ for RocketMQ instance is deployed on an Elastic Compute Service (ECS) instance and you want to access the ApsaraMQ for RocketMQ instance in an internal network, you do not need to specify the instance username or password. The broker automatically obtains the username and password based on the virtual private cloud (VPC) information. * If the instance is a serverless ApsaraMQ for RocketMQ instance, you must specify the username and password to access the instance over the Internet. If you enable the authentication-free in VPCs feature for the serverless instance and access the instance in a VPC, you do not need to specify the username or password. */ builder.setCredentialProvider(new StaticSessionCredentialsProvider("Instance UserName", "Instance Password"));
If you want to access an ApsaraMQ for RocketMQ 4.0 instance, you must specify the AccessKey ID and AccessKey secret of the Alibaba Cloud account or Resource Access Management (RAM) user. Sample code:
// The AccessKey ID that you created in the RAM console for authentication. properties.put(PropertyKeyConst.AccessKey,"Y2lK16J6Eh******"); // The AccessKey secret that you created in the RAM console for authentication. properties.put(PropertyKeyConst.SecretKey,"SPX46tC00z******");
For information about how to obtain an AccessKey pair, see Create an AccessKey pair.
How do I obtain the endpoint that is used to connect to an ApsaraMQ for RocketMQ broker?
ApsaraMQ for RocketMQ 5.x instances: Only a TCP endpoint is provided for each instance.
ApsaraMQ for RocketMQ 4.x instances: A TCP endpoint and an HTTP endpoint are provided for each instance. You can select an endpoint based on the protocol used by your SDK. Each type of endpoint can be used only by clients of the same protocol type.
Obtain the endpoint in the ApsaraMQ for RocketMQ console
Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar, select a region, such as China (Hangzhou). On the Instances page, click the name of the instance that you want to manage.
On the Basic Information tab of the Instance Details page, view the endpoint of the instance.
Obtain the endpoint by calling the corresponding API operation
ApsaraMQ for RocketMQ 5.x instances: GetInstance.
ApsaraMQ for RocketMQ 4.x instances: OnsInstanceBaseInfo.
What limits are imposed on the number of tags to which I can subscribe in ApsaraMQ for RocketMQ?
Tags are specified by producers. A producer can attach only one tag to each message before the message is sent.
When a consumer subscribes to messages, no limit is imposed on the number of tags in the filter rule. However, we recommend that you specify a filter expression that is less than or equal to 1 KB in length.
For more information, see Best practices of topics and tags.
What are the differences between the clustering consumption mode and the broadcasting consumption mode in ApsaraMQ for RocketMQ?
Clustering consumption: When consumers use this mode to consume messages in ApsaraMQ for RocketMQ, a message is processed only by one consumer in the cluster.
Broadcasting consumption: When consumers use this mode to consume messages in ApsaraMQ for RocketMQ, each message is pushed to all consumers in the cluster to ensure that the message is consumed by each consumer at least once.
For more information, see Clustering consumption and broadcasting consumption.
How are messages consumed in a topic to which multiple consumer groups subscribe?
A consumer group can subscribe to multiple topics, and multiple consumer groups can subscribe to the same topic. When multiple consumers subscribe to the same topic, each message in the topic is pushed to each consumer group once. Consumer groups are isolated from each other. Therefore, each message in the topic can be consumed by all consumer groups at the same time.
What is the maximum size of a message body in ApsaraMQ for RocketMQ?
ApsaraMQ for RocketMQ 5.0 instances:
A message cannot exceed 4 MB in size.
ApsaraMQ for RocketMQ 4.0 instances:
Normal or ordered message: 4 MB
Transactional, scheduled, or delayed message: 64 KB
NoteThe total attribute size of a message cannot exceed 16 KB.
What is the retention period for messages in ApsaraMQ for RocketMQ?
ApsaraMQ for RocketMQ 5.0 instances:
Minimum value: 24. Unit: hours.
Maximum value: 720. Unit: hours.
ApsaraMQ for RocketMQ 4.0 instances:
Standard Edition: 3 days. If the 3-day period elapses for a message, the message is automatically deleted.
Enterprise Platinum Edition: 3 days. If the storage capacity that you purchased for your instance is insufficient, ApsaraMQ for RocketMQ automatically deletes the earliest stored messages. In this case, the messages may be retained for less than 3 days.
What load balancing policies are provided by ApsaraMQ for RocketMQ?
For information about the load balancing policies of ApsaraMQ for RocketMQ 5.0 instances, see Load balancing for producers and Load balancing policies for consumers.
For information about the load balancing policies of ApsaraMQ for RocketMQ 4.0 instances, see Load balancing policies.
Are messages delivered again after they fail to be consumed?
If a message fails to be consumed, ApsaraMQ for RocketMQ redelivers the failed message to the consumer.
For information about the message retry policies of ApsaraMQ for RocketMQ 5.0 instances, see Consumption retry.
For information about the message retry policies of ApsaraMQ for RocketMQ 4.0 instances, see Message retry.
Is the broadcasting consumption mode supported by ApsaraMQ for RocketMQ 5.0 instances?
ApsaraMQ for RocketMQ allows multiple consumer groups to subscribe to the same message and each consumer group to initialize multiple consumers. Consumer groups and consumers can be configured to consume messages in the following scenarios:
Broadcast consumption across consumer groups: This scenario is illustrated on the left side of the preceding figure. Each consumer group initializes its own consumer who consumes all messages. Messages are delivered to multiple subscribers from topics in a one-to-many relationship.
This mode is typically used in scenarios such as gateway push and configuration push.
Cluster consumption within a consumer group: This scenario is illustrated on the right side of the preceding figure. Each consumer group initializes multiple consumers, and the messages are sent to all consumers in the group. This is useful when you want to implement horizontal traffic partitioning and load balancing within the group.
This mode is suitable for microservice decoupling.
To implement broadcasting consumption in an ApsaraMQ for RocketMQ 5.0 instance, you can subscribe to messages based on the broadcasting consumption across consumer groups solution instead of configuring code in the client SDK.
What is the maximum scheduled time that can be specified to send scheduled messages in ApsaraMQ for RocketMQ?
ApsaraMQ for RocketMQ 5.0 instances:
Subscription and pay-as-you-go Standard Edition instances and serverless Standard Edition and Professional Edition instances: 7 days.
Subscription and pay-as-you-go Professional Edition and Enterprise Platinum Edition instances: 40 days.
ApsaraMQ for RocketMQ 4.0 instances: 40 days.
You can set the
msg.setStartDeliverTime
parameter of a message to a point in time within the following 40 days. The value is in milliseconds. If you specify a value that is greater than 40 days, the broker cannot deliver the message.NoteA delay of 1 to 2 seconds exists between the scheduled time to send a scheduled message and the actual time to send the message.
What limits are imposed on the number of topics and groups?
ApsaraMQ for RocketMQ 5.0 instances
The upper limits on the number of topics and groups are specified in the computing specification of the instance. For more information, see Limits on instance specifications.
ApsaraMQ for RocketMQ 4.0 instances
Instance type
Topics
Groups
Standard Edition
No limit is imposed.
NoteYou are charged topic occupancy fees for using topics on ApsaraMQ for RocketMQ 4.0 instances. To prevent unnecessary fees, we recommend that you delete topics that you no longer require at the earliest opportunity. For more information, see Billing of the messaging feature.
1,000
Enterprise Platinum Edition
The upper limit is specified in the computing specification of the instance.
1,000
Do I need to attach disks to an ApsaraMQ for RocketMQ instance for storage?
No, you do not need to attach disks to an ApsaraMQ for RocketMQ instance for storage.
You need to specify storage space only when you create an ApsaraMQ for RocketMQ 4.0 Enterprise Platinum Edition instance.
For instances of other editions, you are charged for your actual storage usage based on the pay-as-you-go billing method.
Can I enable or disable the disk encryption feature for an ApsaraMQ for RocketMQ instance after I purchase the instance?
No. You can enable the disk encryption feature for an ApsaraMQ for RocketMQ instance only when you create the instance. After you enable the disk encryption feature for an ApsaraMQ for RocketMQ instance, you cannot disable the feature.