All Products
Search
Document Center

EventBridge:Route events to SMQ

Last Updated:Mar 11, 2026

When downstream services need to consume events asynchronously, you can route events from EventBridge to a Simple Message Queue (formerly MNS) (SMQ) queue. This decouples event producers from consumers and lets you process events at your own pace with built-in retry and dead-letter support.

This topic walks you through creating an event stream that delivers events to an SMQ queue.

Prerequisites

Before you begin, make sure that you have:

Create an event stream

  1. Log on to the EventBridge console. In the left-side navigation pane, click Event Streams.

  2. In the top navigation bar, select a region. Click Create Event Stream.

  3. On the Create Event Stream page, configure the Task Name and Description parameters.

Set up the event source and rules

In the Source, Filtering, and Transformation steps, specify the event source, filtering rules, and transformation logic. Click Next Step.

For event transformation options, see Event transformation. For a practical example of message cleansing, see Use Function Compute to perform message cleansing.

Set the SMQ queue as the sink

In the Sink step, set Service Type to SMQ and configure the following parameters:

ParameterDescriptionExample
Queue NameThe SMQ queue that you created.test
Enable Base64 EncodingWhether to Base64-encode event payloads. If you disable Base64 encoding, received messages contain garbled characters.Yes
Message BodyThe transformation method for events before delivery. For more information, see Event transformation.Complete Event
Select Yes for Enable Base64 Encoding unless your consumer explicitly handles raw binary content.

Configure retry and dead-letter policies

Under Task Property, configure the retry policy and dead-letter queue for the event stream. These settings control how EventBridge handles delivery failures.

For more information, see Retry policies and dead-letter queues.

Save and start the event stream

  1. Click Save.

  2. Go back to the Event Streams page and find the event stream that you created. Click Enable in the Actions column.

Enabling an event stream takes 30 to 60 seconds. Track the progress in the Status column on the Event Streams page.

Verify event delivery

After you enable the event stream, verify that events arrive in the SMQ queue:

  1. Log on to the SMQ console. In the left-side navigation pane, click Queues.

  2. In the top navigation bar, select the same region as your event stream.

  3. On the Queues page, find the target queue and choose More > Send Messages in the Actions column.

  4. In the Receive Message section of the Quick Experience page, click Receive Message.

The following sample code provides an example of received events:

{
    "data":{
        "props":{
            "firstTopic":"topci12****",
            "secondTopic":"",
            "clientId":"GID_MQTT_CONSOLE@@@lmqhb1share01vpc165759566****"
        },
        "body":"Hello World"
    },
    "id":"AC11C08E76C67E7740853B0F604D****",
    "source":"acs:mqtt",
    "specversion":"1.0",
    "type":"mqtt:Topic:SendMessage",
    "datacontenttype":"application/json; charset\u003dutf-8",
    "time":"2022-07-12T03:14:23.447Z",
    "subject":"acs:mq:cn-qingdao:182572506381****:topic/mqtt-cn-2r42rdr****/topci12****",
    "aliyunaccountid":"182572506381****"
}