Polling an Azure Service Bus Queue from an Azure WebJob using Node.js

前端 未结 3 2038
闹比i
闹比i 2021-01-14 19:55

Trying to poll an Azure Service Bus Queue using a WebJob written in Node.js. I created 2 WebJobs. The first is on demand and sends 10 unique messages to the queue. The secon

3条回答
  •  既然无缘
    2021-01-14 20:15

    Switching off the partitioned flag of the Service Bus queue worked for me, too.

    With the partitioned queue some messages had delays of more than 30 minutes. A simple DotNet webclient could download all messages without any delays. However, as soon as nodejs was supposed to download messages, only the first message would be downloaded without problems, afterwards delays showed up. Playing with nodejs to change the http agent options keepalive and socket timeout did not improve the situation.

    After stopping nodejs, I had to wait several minutes before the DotNet client actually started working without problem. This was reproducable several times. I also found the simple DotNet webclient program showed similar problems, after being started and stopped several times in a row.

    Anyway, your post showed me the solution: Turn off the partitioned flag :)

提交回复
热议问题