On January 23, 2019, ApsaraMQ for RocketMQ was optimized in the following aspects: resource isolation, resource application, TCP and HTTP support, and permission management. This topic describes the updates of these features to help you use ApsaraMQ for RocketMQ.
Optimize resource isolation by using instances
ApsaraMQ for RocketMQ provides instances for multitenancy isolation. You can purchase multiple instances in the same region. The instances can be isolated from each other in a logical or physical manner.
ApsaraMQ for RocketMQ provides the following two types of instances:
- Standard Edition: Instances are logically isolated. A maximum of eight instances can be created in a region.
- Enterprise Platinum Edition: Instances are physically isolated. The number of instances that can be created in a region is not limited. For more information, see ApsaraMQ for RocketMQ Enterprise Platinum Edition.
ApsaraMQ for RocketMQ instances are classified into the following types based on whether an instance has a separate namespace. This helps ensure compatibility with the existing resources of existing users.
- Default instance, which is used to ensure compatibility with the existing resources of existing users.
- This type of instance has no separate namespace. Resource names must be globally unique within and across all instances.
- By default, an instance with no separate namespace is automatically generated for the existing resources of ApsaraMQ for RocketMQ users in the region where the resources reside.
- Use one of the following configurations to specify an endpoint. You can obtain the endpoint information on the Instance Details page in the Message Queue for Apache RocketMQ console.
// Recommended configuration. properties.put(PropertyKeyConst.NAMESRV_ADDR, "xxxx"); // Compatible configuration. We recommend that you use the recommended configuration instead of the compatible configuration. properties.put(PropertyKeyConst.ONSAddr, "xxxx");
- New instance.
- This type of instance has a separate namespace. Resource names must be unique within an instance but can be the same across different instances.
- Use one of the following configurations to specify an endpoint. You can obtain the endpoint information on the Instance Details page in the Message Queue for Apache RocketMQ console.
// Recommended configuration. properties.put(PropertyKeyConst.NAMESRV_ADDR, "xxx");
- Your ons-client must be updated to the latest version.
- Java: Release notes
- C++: Release notes
- .NET: Release notes
Optimize resource application
Before the optimization, ApsaraMQ for RocketMQ provides three types of resources:
- Topic
- Producer
- Consumer
The three types of resources are related based on N:N mapping. Each time a topic is created, the topic must be associated with a producer and a consumer. This process is very complex for medium- and large-sized enterprises.
To improve user experience and help new users get started, Message Queue for Apache RocketMQ provides a simplified process for applying for resources.
- The resource application process is optimized in the following two aspects:
- Topic management (unchanged)
You must apply for a topic. A topic is used to classify messages and is the primary classifier.
- Group management
- You do not need to apply for a producer ID. Producer IDs and consumer IDs are integrated into group IDs. In the updated version, the Producers module is removed from the Message Queue for Apache RocketMQ console. The Producers and Consumers modules are integrated into the Groups module.
- You do not need to associate a producer ID or a consumer ID with a topic. You need to only apply for a group ID and associate the group ID with a topic in the code.
- Take note of the following compatibility issues:
- The list of producer IDs is no longer displayed. This does not affect the services that are in use.
- The requested consumer IDs that start with CID- or CID_ can still be used and can be specified as the values of the
PropertyKeyConst.ConsumerId
orPropertyKeyConst.GROUP_ID
parameter in the code.
- Topic management (unchanged)
- In the sample code, existing producer IDs or consumer IDs can still be used, and the services that are in use are not affected. However, we recommend that you replace your existing configuration with the recommended configuration.
- Recommended configuration: Integrate producer IDs and consumer IDs into group IDs.
// Configure the PropertyKeyConst.GROUP_ID parameter. The original PropertyKeyConst.ProducerId and PropertyKeyConst.ConsumerId parameters are deprecated. properties.put(PropertyKeyConst.GROUP_ID, "The original CID-XXX or the GID-XXX");
- Compatible configuration: Use a producer ID to identify a producer and a consumer ID to identify a consumer.
// When you create a producer, you must configure the PropertyKeyConst.ProducerId parameter. properties.put(PropertyKeyConst.ProducerId, "The original PID-XXX or the GID-XXX"); // When you create a consumer, you must configure the PropertyKeyConst.ConsumerId parameter. properties.put(PropertyKeyConst.ConsumerId, "The original CID-XXX or the GID-XXX");
- Recommended configuration: Integrate producer IDs and consumer IDs into group IDs.
ApsaraMQ for RocketMQ Standard Edition supports HTTP and RESTful. This makes Message Queue for Apache RocketMQ easy to use. You can connect to a Standard Edition instance in a short period of time within a network or across networks. The Standard Edition also provides HTTP client SDKs for seven programming languages. For more information, see Usage notes for HTTP client SDKs.
Migrate RAM policies
ApsaraMQ for RocketMQ provides a feature that allows you to grant permissions to Resource Access Management (RAM) users. To meet the centralized management requirements of Alibaba Cloud RAM, this feature is no longer supported after April 2, 2019. We recommend that you migrate the permission configurations of your account at the earliest opportunity.
- We recommend that you configure RAM policies at the earliest opportunity. For more information, see Grant permissions to RAM users.
- Resources on which the permissions are granted to your account are not affected. You can still use these resources. However, we recommend that you go to the RAM console to configure and manage RAM policies.