【发布时间】:2019-10-22 05:57:08
【问题描述】:
我之前使用 Linux docker 和可以成功处理 Azure ServiceBus 消息的 NodeJS 脚本。
但是,现在我使用 Windows docker/simple 在 Windows 上使用相同的代码运行,即使我检查了队列中有消息,也会出现以下错误消息:
没有可接收的消息
参考代码:
let azureSb = require('azure-sb'),
connectionString = 'xxxxx',
serviceBusService = azureSb.createServiceBusService(connectionString);
serviceBusService.receiveQueueMessage(PDF_PRINT_QUEUE, {isPeekLock: true}, (error, message) => {
if (error) {
console.log(error);
}
console.log('OK');
......
}
以下是我使用的主要 NodeJS 包:
# npm list --depth=0
+-- adal-node@0.2.1
+-- azure-keyvault@3.0.5
+-- azure-sb@0.11.1
+-- azure-storage@2.10.3
+-- http@0.0.0
+-- puppeteer@1.20.0
`-- puppeteer-core@1.20.0
【问题讨论】:
-
你可以参考这个article。
-
嗨@JoeyCai,当我尝试在 Mac/Linux 上运行时,我已经遵循了该文档。但现在我想在 Windows 上运行但出现错误(无法从 ServiceBus 消息队列获取消息)
-
我用
azure-sb@0.11.1测试它对我有用,所以我想这不是代码问题。也许你可以试试azure/service-bus。
标签: node.js windows message azureservicebus servicebus