A topic in Simple Message Queue (SMQ, formerly MNS) is a container that stores messages. Publishers send messages to a topic, and the topic delivers a copy of each message to every active subscription -- similar to a mailing list where every subscriber receives every message.
Publishers and subscribers operate independently: publishers do not wait for subscribers, and each subscriber processes messages at its own pace.
SMQ topics support five subscription endpoint types: queues, HTTP servers, Short Message Service (SMS), Direct Mail, and Mobile Push. Each endpoint independently receives and processes its own copy of every published message.
When to use topics
Use topics when a single message needs to reach multiple consumers. Common scenarios:
| Scenario | Description |
|---|---|
| Event broadcasting | Notify multiple downstream services when an order is placed or a resource status changes. |
| Fan-out processing | Route a single event to a queue for processing, an HTTP server for logging, and an SMS endpoint for alerting -- all at once. |
| Selective delivery | Attach a filtering tag so each subscriber receives only the messages it needs. |
If each message needs only one consumer, use a queue instead.
Features
At-least-once delivery
Every message published to a topic reaches each subscriber at least once, provided the message is within its retention period and has not exceeded the maximum delivery attempts.
Multiple subscriber types
A single topic can deliver messages to different endpoint types simultaneously:
| Endpoint type | Use case |
|---|---|
| Queue | Buffer messages for asynchronous processing. |
| HTTP server | Push messages to web servers. |
| SMS | Send text notifications to mobile phone numbers. |
| Direct Mail | Send email notifications. |
| Mobile Push | Deliver push notifications to mobile apps. |
Message filtering
Assign a tag when you publish a message. Subscribers with matching filter rules receive only the tagged messages, reducing unnecessary processing.
Each message supports one filtering tag of up to 16 characters.
Topic properties
| Property | Description | Valid values |
|---|---|---|
| Topic name | Globally unique identifier of the topic in a cluster. | Up to 120 characters. Letters, digits, and hyphens (-). Must start with a letter. |
| Maximum message size | Maximum size of the message body, in KB. | 1 to 64. Default: 64. |
| Logging | When enabled, SMQ pushes operation logs to a specified logging bucket. Use these logs to view message traces, delay, and other diagnostics. For details, see Log management. | true or false. |
Limits
| Item | Limit | What happens if exceeded |
|---|---|---|
| Topic name length | 120 characters | Topic creation fails. |
| Topics per region | 1,000 | To request more, open Quota Center and apply to increase Maximum Topic Quantity in a Single Region. See Submit an application to increase a quota. |
| Message size | 64 KB | The message is discarded. |
| Subscriptions per topic | 100 | -- |
| Message retention period | 1 day | Expired messages are automatically deleted. Set this value based on your workload. |
| Filtering tags per message | 1 | Each tag can be up to 16 characters. |
| Queue-to-topic subscription | The subscribing queue size must equal or exceed the topic size. | Subscription creation fails. |