Reputation: 1167
I was using Linux docker before with NodeJS script that could handle Azure ServiceBus message successfully.
However, now I use Windows docker/simple run on Windows with same code, below error message came out even I checked there were messages on queue:
No messages to receive
Code for Reference:
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');
......
}
Below are my main NodeJS packages that I use:
# npm list --depth=0
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
Upvotes: 0
Views: 90
Reputation: 141
I don't think it's the problem with azure-sb library, it seems to work fine for me in windows. However, I'd recommend using the latest library that is based on AMQP which is better performant.
I know this is a late reply, but just in case someone is running into issues with the older service-bus libraries and landed here, refer to the links below.
The latest version 7.0.0 of @azure/service-bus
(based on AMQP) has been published.
Upvotes: 1