This topic describes how to create a custom event source of the Message Queue for RabbitMQ type in the EventBridge console.
Prerequisites
- Message Queue for RabbitMQ
- EventBridge
Note
The regions that support custom event sources of the Message Queue for RabbitMQ type are subject to the regions where EventBridge is available.
Procedure
Sample event
{
"datacontenttype":"application/json;charset=utf-8",
"aliyunaccountid":"143998900779****",
"data":{
"envelope":{
"deliveryTag":98,
"exchange":"",
"redeliver":false,
"routingKey":"housekeeping"
},
"body":{
"Hello":"EventBridge"
},
"props":{
"contentEncoding":"UTF-8",
"messageId":"f7622d51-e198-41de-a072-77c1ead7****"
}
},
"subject":"acs:amqp:cn-hangzhou:143998900779****:/instances/amqp-cn-zvp2av0m****/vhosts/eb-connect/queues/housekeeping",
"aliyunoriginalaccountid":"143998900779****",
"source":"housekeeping.rabbitmq",
"type":"amqp:Queue:SendMessage",
"aliyunpublishtime":"2021-08-12T06:56:50.783Z",
"specversion":"1.0",
"aliyuneventbusname":"Housekeeping-Connect",
"id":"8b09e19b-8cbd-4c46-ab77-9cc39c44****",
"time":"2021-08-12T06:56:40.709Z",
"aliyunregionid":"cn-hangzhou"
}
For more information about the parameters defined in the CloudEvents specification, see Overview.
The following table describes the parameters in the data block.
Parameter | Type | Example | Description |
---|---|---|---|
body | Map | The content of the message. | |
Hello | String | EventBridge | The user data. |
props | Map | The properties of the message. | |
contentEncoding | String | utf-8 | The format in which the content of the message is encoded. |
messageId | String | f7622d51-e198-41de-a072-77c1ead7**** | The ID of the message. The ID of each message is unique. |
envelope | Map | The envelope information about the message. | |
deliveryTag | Int | 98 | The tag of the message. |
exchange | String | N/A | The name of the exchange that sent the message. |
redeliver | Boolean | false | Indicates whether the message can be resent. Valid values:
|
routingKey | String | housekeeping | The routing rule of the message. |