问题描述
原生应用中使用RabbitMQ,是否可以不改动代码的情况下直接转换为使用Azure Event Hub呢?
问题解答
Rabbit MQ使用的协议是AMQP 0-9-1,而Azure Event Hub 或 Service Bus 使用的是AMQP1.0,所以无法直接复用之前的代码。需要使用Azure Event Hub SDK来生产/消费消息。
Which protocols does RabbitMQ support?
RabbitMQ was originally developed to support AMQP 0-9-1.
参考资料
Which protocols does RabbitMQ support? https://www.rabbitmq.com/docs/protocols
AMQP 1.0 in Azure Service Bus and Event Hubs protocol guide : https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-protocol-guide?toc=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fazure%2Fevent-hubs%2Ftoc.json&bc=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fazure%2Fbread%2Ftoc.json