All Products
Search
Document Center

ApsaraMQ for RocketMQ:Use instances

Last Updated:Mar 11, 2026

On January 23, 2019, ApsaraMQ for RocketMQ was optimized in the following aspects:

  • Instance-based resource isolation with two edition types

  • Unified group IDs to simplify resource management

  • TCP and HTTP support

  • RAM policy migration

Note Update your ons-client to the latest version to ensure compatibility between new and existing resource configurations.

Instance types

ApsaraMQ for RocketMQ provides instances for multitenancy isolation. You can purchase multiple instances in the same region. The following two editions are available.

EditionIsolation levelInstance limit per region
Standard EditionLogical isolation8
Enterprise Platinum EditionPhysical isolationNo limit

For more information, see ApsaraMQ for RocketMQ Enterprise Platinum Edition.

Namespace behavior

Instances are classified by whether they have a separate namespace. This classification maintains backward compatibility for existing users.

Default instances (no namespace)

A default instance has no separate namespace. For each region where your existing resources reside, a default instance is automatically created.

  • Resource names such as topics and group IDs must be globally unique across all instances.

  • Both the recommended and legacy endpoint configurations are supported.

Get the endpoint value from the Instance Details page in the Message Queue for Apache RocketMQ console.

// Recommended
properties.put(PropertyKeyConst.NAMESRV_ADDR, "xxxx");

// Legacy (use the recommended configuration instead)
properties.put(PropertyKeyConst.ONSAddr, "xxxx");

New instances (with namespace)

A new instance has a separate namespace. Resource names only need to be unique within the instance -- the same name can exist in different instances.

Get the endpoint value from the Instance Details page in the Message Queue for Apache RocketMQ console.

// Recommended
properties.put(PropertyKeyConst.NAMESRV_ADDR, "xxx");
Important

New instances require the latest ons-client version. Update your SDK before connecting:

Unified group IDs

Before this update, ApsaraMQ for RocketMQ required three separate resource types -- topics, producers, and consumers -- each linked through N:N mappings. Every new topic had to be associated with both a producer and a consumer, which added unnecessary complexity.

What changed

Topics remain unchanged. Apply for a topic to classify messages.

Group IDs replace separate producer IDs and consumer IDs:

  • The Producers and Consumers modules in the console are merged into a single Groups module.

  • Apply for a group ID and associate it with a topic directly in your code. No separate producer or consumer ID registration is required.

Compatibility

Existing configurations continue to work:

  • Consumer IDs that start with CID- or CID_ are still valid. Specify them with either PropertyKeyConst.ConsumerId or PropertyKeyConst.GROUP_ID.

  • The producer ID list is no longer displayed in the console, but running services are not affected.

Migrate to group IDs

Use PropertyKeyConst.GROUP_ID instead of the deprecated PropertyKeyConst.ProducerId and PropertyKeyConst.ConsumerId parameters.

Recommended configuration:

// Use GROUP_ID for both producers and consumers.
// PropertyKeyConst.ProducerId and PropertyKeyConst.ConsumerId are deprecated.
properties.put(PropertyKeyConst.GROUP_ID, "The original CID-XXX or the GID-XXX");

Legacy configuration (still supported):

// Producer
properties.put(PropertyKeyConst.ProducerId, "The original PID-XXX or the GID-XXX");

// Consumer
properties.put(PropertyKeyConst.ConsumerId, "The original CID-XXX or the GID-XXX");

HTTP and RESTful support

Standard Edition instances support HTTP and RESTful APIs. You can connect to a Standard Edition instance in a short period of time within a network or across networks. HTTP client SDKs are available for seven programming languages.

For more information, see Usage notes for HTTP client SDKs.

RAM policy migration

The built-in permission management feature in ApsaraMQ for RocketMQ is no longer supported after April 2, 2019. Manage all permissions through Alibaba Cloud Resource Access Management (RAM) instead.

  • Existing resource permissions are not affected. You can still use these resources.

  • Migrate permission configurations to the RAM console as soon as possible.

For instructions, see Grant permissions to RAM users.