如何将 RabbitMq 交换放入 asyncapi 定义?
在示例中我发现了这个......
channels:
user/signup:
publish:
bindings:
amqp:
expiration: 100000
userId: guest
cc: ['user.logs']
priority: 10
deliveryMode: 2
mandatory: false
bcc: ['external.audit']
replyTo: user.signedup
timestamp: true
ack: false
bindingVersion: 0.2.0
channel 名称中斜杠之前的部分可能意味着交换吗?
最佳答案
有一个完整的 exchange
属性可用于 channel binding对于 AMQP。您当前使用的绑定(bind)是 operation binding .
这意味着您可以这样定义它
channels:
user/signedup:
publish:
bindings:
amqp:
expiration: 100000
userId: guest
cc: ['user.logs']
priority: 10
deliveryMode: 2
mandatory: false
bcc: ['external.audit']
replyTo: user.signedup
timestamp: true
ack: false
bindingVersion: 0.2.0
bindings:
amqp:
is: routingKey
queue:
name: my-queue-name
durable: true
exclusive: true
autoDelete: false
vhost: /
exchange:
name: myExchange
type: topic
durable: true
autoDelete: false
vhost: /
bindingVersion: 0.2.0
关于model - AsyncApi 和 RabbitMq,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67941467/