A producer sends a message to an exchange. The exchange then routes the message to one or more queues based on the routing key and the binding key, or discards the message.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
amqp:CreateExchange |
create |
*Exchange
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
amqp-cn-v0h1kb9nu*** |
| VirtualHost |
string |
Yes |
The name of the vhost to which the exchange belongs. |
test |
| ExchangeName |
string |
Yes |
The name of the exchange. Note:
|
DemoExchange |
| ExchangeType |
string |
Yes |
The type of the exchange. Valid values:
|
DIRECT |
| XDelayedType |
string |
No |
An x-delayed-message exchange lets you use the x-delay header property to specify a delivery delay for a message in milliseconds. The routing rule for the delayed message is determined by the exchange type that you specify for the XDelayedType parameter. This parameter sets the actual exchange type to which the message is delivered after the delay. Valid values:
|
DIRECT |
| AutoDeleteState |
boolean |
Yes |
Specifies whether to automatically delete the exchange. Valid values:
|
false |
| Internal |
boolean |
Yes |
Specifies whether the exchange is an internal exchange. Valid values:
|
false |
| AlternateExchange |
string |
No |
The alternate exchange. Configure an alternate exchange to receive messages that fail to be routed. |
DemoAE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
021788F6-E50C-4BD6-9F80-66B0A19A**** |
Examples
Success response
JSON format
{
"RequestId": "021788F6-E50C-4BD6-9F80-66B0A19A****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.