This topic describes the functions and features of ApsaraMQ for RocketMQ.
Background information
ApsaraMQ for RocketMQ provides highly available message-oriented services in multiple Alibaba Cloud regions. To ensure high availability of services, multiple data centers are deployed in a single region. If one data center is unavailable, applications can still publish and subscribe to messages.
ApsaraMQ for RocketMQ supports TCP-based and HTTP-based access using SDKs for multiple programming languages. This way, applications in different programming languages can be quickly connected to ApsaraMQ for RocketMQ. You can either deploy your applications on Alibaba Cloud Elastic Compute Service (ECS) instances or your own enterprise clouds or embed them into a mobile device or IoT device to connect to ApsaraMQ for RocketMQ for sending and receiving messages. Additionally, local developers can access ApsaraMQ for RocketMQ over the Internet to send and receive messages.
Multi-protocol access
TCP: The TCP-based SDK access mode is more specialized, reliable, and stable than the HTTP-based access mode. ApsaraMQ for RocketMQ supports clients that use the following programming languages over TCP: Java, C, C++, and .NET.
HTTP: RESTful APIs are used for HTTP-based access. This mode is easy to use and provides powerful cross-network access capabilities. ApsaraMQ for RocektMQ supports clients that use the following programming languages over HTTP: Java, C++, .NET, Go, Python, Node.js, and PHP.
Management tools
Web console: supports topic management, group management, message queries, message trace queries, and monitoring and alerting. For more information, see User Guide.
OpenAPI: allows you to integrate ApsaraMQ for RocketMQ management tools into your console. For more information about API operations provided by ApsaraMQ for RocketMQ, see Release notes.
Message types
Normal messages
Normal messages are messages that have no special features in ApsaraMQ for RocketMQ. They are different from featured messages, such as scheduled messages, delayed messages, ordered messages, and transactional messages.
Scheduled messages and delayed messages
ApsaraMQ for RocketMQ allows producers to deliver messages at a specific point in time or after a specific period of time. The maximum time period is 40 days.
Ordered messages
ApsaraMQ for RocketMQ allows consumers to consume messages in the order in which they are delivered.
Transactional messages
ApsaraMQ for RocketMQ provides a distributed transaction feature similar to X/Open XA to ensure ultimate transaction consistency of distributed transactions.
Table 1. Comparison among message types
Message type | Support for reliable synchronous transmission | Support for reliable asynchronous transmission | Support for one-way transmission | Support for multi-thread transmission | Performance |
Normal messages | Yes | Yes | Yes | Yes | Highest |
Transactional messages | |||||
Scheduled and delayed messages | |||||
Partitionally ordered messages | Yes | No | No | No | High |
Message functions
Message retry: After a consumer returns the response for a message retry, ApsaraMQ for RocketMQ redelivers the message based on the specified retry rule. For more information, see Message retry.
At-least-once delivery: ApsaraMQ for RocektMQ ensures that each message is consumed at least once. Consumers may receive the same message multiple times because ApsaraMQ for RocketMQ is developed based on a distributed architecture and uses a dynamic network. If consumers restart their applications, they may receive the same message multiple times. Applications must process the same message multiple times without causing errors or inconsistencies in data. For information about the best practices for message idempotence, see Message idempotence.
Message filtering: ApsaraMQ for RocketMQ allows you to configure message attributes to classify messages that producers send to topics on the ApsaraMQ for RocketMQ broker. You can configure filter conditions for consumers so that the consumers can subscribe to messages that have the specified attributes in the topics. Then, the broker filters the messages sent by the producers and delivers only the messages that meet the specified conditions to the consumers.
Message features
Message query: ApsaraMQ for RocketMQ allows you to query messages by message ID, message key, and topic.
Message trace query: A message trace records the routing information about a message sent from a producer to an ApsaraMQ for RocketMQ broker, then to a consumer. Message traces can help you troubleshoot issues.
Clustering consumption and broadcasting consumption: In clustering consumption mode, a message only needs to be processed by one of the consumers in the cluster. In broadcasting consumption mode, ApsaraMQ for RocketMQ pushes each message to all registered consumers in the cluster to ensure that all messages are consumed by each consumer at least once.
Consumer offset reset: You can change the offset to the latest message to skip the accumulated messages for a consumer. You can also change the offset to the corresponding offset of a previous point in time for a consumer. The consumption starts from the offset that you specify.
Dead-letter queues: Messages that cannot be consumed as expected are stored in a special queue called dead-letter queue for subsequent processing.
Dashboard: The dashboard feature provides rich, comprehensive, and multi-dimensional statistical metrics. You can view metrics related to message production, consumption, and accumulation by instance, topic, and group.
Monitoring and alerting: You can use the monitoring and alerting feature of ApsaraMQ for RocketMQ to monitor the message consumption status of a topic to which a group subscribes and receive alert messages. This way, you can monitor the message consumption status in real time and resolve errors in a timely manner.