Lightweight Message Queue (formerly MNS) provides an end-to-end tracing solution that tracks messages across their full lifecycle, helping you diagnose issues in distributed messaging systems.
Overview
In distributed systems, a single request often traverses multiple services. Message queues handle asynchronous communication tasks such as peak-load shifting and application decoupling. When messages move between producers, the queue, and consumers, any failure in the chain can cause message loss, delays, or duplicate consumption, making root-cause analysis difficult.
The Lightweight Message Queue (formerly MNS) end-to-end tracing solution records the full transmission path of a message throughout its lifecycle, providing detailed logs and performance metrics. You can ingest OpenTelemetry-compliant trace data into Alibaba Cloud Tracing Analysis to quickly diagnose anomalies.
Core Capabilities
-
Production and consumption audit: Records operation details, running time, and result status.
-
Conditional query: Quickly locates issues using filters such as message ID, queue name, and time range.
-
Standardized integration: Follows the OpenTelemetry standard and seamlessly integrates with application tracing data.
-
Anomaly detection: Automatically detects and marks abnormal traces to accelerate fault diagnosis.
Trace Definition
Lightweight Message Queue tracing follows the OpenTelemetry Messaging Spans specification and extends it with message queue-specific attributes.
Generic Messaging Span Attributes
Lightweight Message Queue supports the generic messaging span attributes defined in the OpenTelemetry standard. For details, see the OpenTelemetry Messaging Spans specification.
These attributes include the following:
-
messaging.system: Identifier for the messaging system. -
messaging.operation.name: Name of the operation. -
messaging.operation.type: Type of the operation. -
messaging.destination.name: Name of the destination queue or subject. -
messaging.message.id: Message ID. -
error.type: Error type (when the operation fails).
Lightweight Message Queue-Specific Attributes
In addition to the standard attributes, Lightweight Message Queue provides the following span-specific attributes:
|
Attribute Name |
Type |
Description |
Example Value |
Requirement Level |
|
|
string |
Name of the specific Lightweight Message Queue operation method. |
SendMessage, ReceiveMessage, PublishMessage |
Required |
|
|
string |
The unique id of the request. |
6733433D43444218004FAED2 |
Required |
|
|
string |
Message tag for messages published to a subject. |
order, payment |
Optional |
|
|
int |
UNIX timestamp (in seconds) when the message becomes visible again. |
1731413593 |
Optional |
|
|
string |
Receipt handle returned when receiving a message. |
8-oMWXHzxBZlgIlzuz8ztxz0z8MHzcT8Z3Zsy3y0 |
Optional |
|
|
string |
Receipt handle used to delete or modify a message. |
8-oMWXHzxBZlgIlzuz8ztxz0z8MHzcT8Z3Zsy3y0 |
Optional |
|
|
string |
Subscription type. |
HTTP, HTTPS, QUEUE |
Optional |
Attribute Value Details
The following values are supported for messaging.smq.operation:
-
SendMessage: Send a queue message. -
BatchSendMessage: Send queue messages in batches. -
ReceiveMessage: Receive a queue message. -
BatchReceiveMessage: Receive queue messages in batches. -
DeleteMessage: Delete a queue message. -
BatchDeleteMessage: Delete queue messages in batches. -
ChangeMessageVisibility: Change the visibility timeout of a message. -
PeekMessage: Peek at a queue message without removing it. -
BatchPeekMessage: Peek at queue messages in batches without removing them. -
PublishMessage: Publish a message to a subject. -
ConsumeMessage: Consume a subscribed message. -
AckMessage: Confirm message consumption. -
Notify: Push a notification.
The following values are supported for messaging.smq.subscription.type:
-
HTTP: HTTP endpoint subscription. -
HTTPS: HTTPS endpoint subscription. -
QUEUE: Queue subscription.
Limits
-
Only the Java SDK client (version 1.3.0 or later) supports reporting trace data to Tracing Analysis. For more information about SDK versions, see Version history.
Trace Data Ingestion Options
Integrate Lightweight Message Queue with Application Real-Time Monitoring Service (ARMS) for unified trace data collection, storage, and analysis. For more information, see What is application monitoring?.
Integration with ARMS Application Monitoring
For step-by-step instructions, see Application onboarding.