Skip to main content
 首页 » 编程设计

python之Azure 中与 Aws SqS 最相似的队列服务是什么

2024年11月24日11mq0036

我正在使用 AWS SqS,作为迁移到 Azure 的一部分,我正在测试 Azure 测试 Azure 队列 https://learn.microsoft.com/en-us/azure/storage/queues/storage-python-how-to-use-queue-storage还有rabbitmq https://www.rabbitmq.com/tutorials/tutorial-one-python.html .该应用程序是在 python 中,那么最相似的是什么?

请您参考如下方法:

有很多选择,我推荐你使用Service bus queue .

from azure.servicebus import QueueClient, Message 

创建队列客户端

queue_client = QueueClient.from_connection_string("<CONNECTION STRING>", "<QUEUE NAME>") 

向队列发送一条测试消息

msg = Message(b'Test Message') 
queue_client.send(msg) 

这是关于如何开始使用 python 的文档.