What are the advantages of ApsaraMQ for RocketMQ 5.0 series instances over 4.0 series instances?
What client versions are ApsaraMQ for RocketMQ 5.0 series instances compatible with?
How do I enable public network access for ApsaraMQ for RocketMQ?
What is the difference between ordered messages and normal messages?
How do I obtain the username and password to connect to the server?
Is there a limit on the number of tags for an ApsaraMQ for RocketMQ subscription?
How are messages consumed when multiple groups subscribe to the same topic?
What is the maximum message body size in ApsaraMQ for RocketMQ?
Do ApsaraMQ for RocketMQ 5.0 series instances support broadcasting consumption?
What is the maximum delay for scheduled messages in ApsaraMQ for RocketMQ?
Are there limits on the number of topics and groups for an instance?
Does ApsaraMQ for RocketMQ require mounting disks for storage?
Can I enable or disable the disk encryption feature for a purchased instance?
How do I use Spring Boot to connect to ApsaraMQ for RocketMQ?
What are the advantages of ApsaraMQ for RocketMQ 5.0 series instances over 4.0 series instances?
Compared with previous server versions, 5.0 series instances feature a more advanced architecture, simplified development and O&M, more flexible costs, and more comprehensive sales models. For more information, see Differences and compatibility between v4.x and v5.x.
What client versions are ApsaraMQ for RocketMQ 5.0 series instances compatible with?
ApsaraMQ for RocketMQ 5.0 series instances are compatible with open source Apache RocketMQ 5.x, 4.x, and 3.x clients, and ApsaraMQ for RocketMQ ONS 1.x clients. For more information, see Server-side version compatibility.
What language SDKs does ApsaraMQ for RocketMQ support?
ApsaraMQ for RocketMQ 5.0 series: Supports TCP SDKs for Java, C/C++, C#, and Go. For more information, see SDK reference overview for 5.0 series.
ApsaraMQ for RocketMQ 4.0 series: Supports TCP SDKs for Java, C/C#, and .NET, and HTTP SDKs for Java, Go, Python, Node.js, PHP, C#, and C++. For more information, see SDK reference overview for 4.0 series.
How do I enable public network access for ApsaraMQ for RocketMQ?
5.0 series instances: You can enable public network access when you purchase an instance. If you did not enable public network access when you created the instance, you can enable it by upgrading the instance. For information about billing for public network access for 5.0 series instances, see Public network access fees.
4.0 series instances: Public endpoints are supported by default. You do not need to perform manual configurations. For information about billing for public network access for 4.0 series instances, see Public network traffic pricing details.
You can obtain the public endpoint on the Instance Details page in the ApsaraMQ for RocketMQ console.
What is the difference between ordered messages and normal messages?
Normal messages are not guaranteed to be consumed in the same order that they are produced.
For ordered messages, all messages are partitioned by ShardingKey. Messages within the same partition are consumed on a first in, first out (FIFO) basis. The order is guaranteed only for messages within the same partition. The consumption order of messages in different partitions is not guaranteed. For more information, see Ordered messages.
How do I get the username and password to connect to the server-side?
5.0 series instances: When you access a 5.0 series instance, specify the username and password of the instance. The following sample code provides an example:
/** * If you use a public endpoint to access the instance, you must also set the username and password for the instance in the configuration. Obtain the username and password from the Intelligent Identity Recognition tab on the Access Control page in the console. * If you access the instance from an Alibaba Cloud ECS instance over an internal network, you do not need to specify this configuration. The server-side intelligently obtains the information based on the internal VPC data. * If the instance is a serverless instance, you must set the username and password for public network access. If you enable authentication-free access over the internal network, you do not need to set the username and password for internal network access. */ builder.setCredentialProvider(new StaticSessionCredentialsProvider("Instance UserName", "Instance Password"));
4.0 series instances: When you access a 4.0 series instance, specify the AccessKey ID and AccessKey secret of your Alibaba Cloud account or RAM user. The following sample code provides an example:
// The AccessKey ID for Alibaba Cloud identity verification. Create it in the RAM console. properties.put(PropertyKeyConst.AccessKey,"Y2lK16J6Eh******"); // The AccessKey secret for Alibaba Cloud identity verification. Create it in the RAM console. properties.put(PropertyKeyConst.SecretKey,"SPX46tC00z******");For more information about how to obtain an AccessKey pair, see Create an AccessKey pair.
How do I get the endpoint to connect to the server-side?
5.x instances use TCP endpoints. Access using HTTP SDKs is not supported.
4.x instances provide both TCP and HTTP endpoints. You must select an endpoint that matches the protocol of your SDK. Endpoints of different protocols cannot be used together.
Obtain from the 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 endpoints of the instance.
Obtain by calling an API operation
5.x instances: Call the GetInstance API operation.
4.x instances: Call the OnsInstanceBaseInfo API operation.
Is there a limit on the number of tags for an ApsaraMQ for RocketMQ subscription?
Tags are set by producers when they send messages. Each message can have one tag.
When a consumer subscribes to messages, there is no limit on the number of tags in the filter rule. However, we recommend that the filter expression does not exceed 1 KB.
For more information, see Best practices for topics and tags.
What is the difference between clustering consumption and broadcasting consumption in ApsaraMQ for RocketMQ?
Clustering consumption: When this consumption mode is used, ApsaraMQ for RocketMQ assumes that any message needs to be processed by only one consumer in the cluster.
Broadcasting consumption: When this consumption mode is used, ApsaraMQ for RocketMQ pushes each message to all consumers in the cluster. This ensures that each message is consumed at least once by each consumer.
For more information, see Clustering consumption and broadcasting consumption.
How are messages consumed when multiple groups subscribe to the same topic?
A group can subscribe to multiple topics, and a topic can be subscribed to by multiple groups. When multiple groups subscribe to the same topic, each group receives a copy of the message. The groups are isolated from each other and can consume the message concurrently.
What is the maximum message body size in ApsaraMQ for RocketMQ?
5.0 series instances:
Up to 4 MB.
4.0 series 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.
How long can messages be stored in ApsaraMQ for RocketMQ?
5.0 series instances:
Minimum value: 24. Unit: hours.
Maximum value: 720. Unit: hours.
4.0 series instances:
Standard Edition: The storage duration is 3 days. Messages are automatically deleted after this period.
Enterprise Platinum Edition: The storage duration is 3 days. If the storage space of your purchased instance is insufficient, ApsaraMQ for RocketMQ deletes the earliest messages. In this case, the message storage duration may be less than 3 days.
What are the message load balancing policies?
5.0 series instances: Producer load balancing policies for 5.0 series and Consumer load balancing policies for 5.0 series.
4.0 series instances: Message load balancing policies for 4.0 series.
Are messages re-consumed after a consumption failure?
If a message fails to be consumed, ApsaraMQ for RocketMQ redelivers the message to the consumer for re-consumption.
Do ApsaraMQ for RocketMQ 5.0 series instances support broadcasting consumption?
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.
For 5.0 series instances, you do not need to separately configure the client SDK. You can achieve the broadcasting effect by designing the subscription relationship based on the model of broadcasting consumption across consumer groups.
What is the maximum delay for scheduled messages in ApsaraMQ for RocketMQ?
5.0 series 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.
4.0 series instances: The maximum scheduled time is 40 days.
You can set the
msg.setStartDeliverTimeparameter 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.
Are there limits on the number of topics and groups for an instance?
5.0-series instances
The maximum number of topics and groups depends on the instance specifications. For more information, see Instance specifications and limits.
Series 4 instances
Instance type
Topic limit
Group limit
Standard instance
Unlimited
NoteFor 4.0 series instances, you are charged topic resource usage fees based on the number of topics. To avoid extra fees, promptly clean up topics that are no longer in use. For more information about billing, see Pricing of message sending and receiving.
1,000
Enterprise Platinum Edition instance
The limit is based on the topic specification selected at the time of purchase.
1,000
Does ApsaraMQ for RocketMQ require mounting disks for storage?
No, it does not.
You only need to select the storage space size when you create a 4.0 series Enterprise Platinum Edition instance. The actual storage is configured based on the selected size.
For other instance editions, you are charged on a pay-as-you-go basis for the actual amount of stored messages. You do not need to manage storage configurations.
Can I enable or disable the disk encryption feature for a purchased instance?
No, you cannot. Disk encryption must be enabled when you create an instance. You cannot disable the disk encryption feature for an instance after it is enabled.