0

I am running an Azure function on NodeJS that reads ~4K records from a SQL Server database and sends them to a Service Bus queue using the 'azure-sb' sdk.

If I send the messages sequentially it is too slow. If I use async queues to send many messages in parallel it can go very fast, but it eventually some messages start throwing this error:

Executed 'Functions.test-function' (Failed, Id=329f0443-e8f6-42ed-92ae-0e9035511635) [08/31/2018 09:04:26] System.Private.CoreLib: Exception while executing function: Functions.test-function. System.Private.CoreLib: Result: Failure [08/31/2018 09:04:26] Exception: Error: getaddrinfo ENOTFOUND xxxxxxxxx.servicebus.windows.net xxxxxxxxxx.servicebus.windows.net:443 [08/31/2018 09:04:26] Stack: Error: getaddrinfo ENOTFOUND xxxxxxxxxx.servicebus.windows.net xxxxxxxxx.servicebus.windows.net:443 [08/31/2018 09:04:26] at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:50:26).

How can I achieve high throughput with the NodeJS SDK?

Jayendran
  • 9,638
  • 8
  • 60
  • 103
Mat-Tap
  • 725
  • 1
  • 11
  • 27
  • hope [this](https://stackoverflow.com/a/17691556/7073340) helps – Jayendran Aug 31 '18 at 12:03
  • It is not the case. The service bus occasionally return the error when I'm calling it with a lot of concurrent calls. If I call it slowly or few concurrent calls it never throws the error. – Mat-Tap Aug 31 '18 at 14:41

0 Answers0