Azure / azure-functions-servicebus-extension

Service Bus extension for Azure Functions
MIT License
65 stars 35 forks source link

When topic subscription is disabled, service bus triggers generate thousands of exceptions per minute trying to reconnect #229

Closed GABRIELNGBTUC closed 7 months ago

GABRIELNGBTUC commented 9 months ago

Hello,

In our infrastructure, we have several functions using service bus triggers

Sometimes, we need to disable the subscriptions for a reason X or Y. Or the service bus becomes unavailable due to an Azure outage.

In those case, we see a massive amount of exceptions (Millions per hour) generated due to errors such as "{topicname}/{topicsubscriptionname} is disabled".

My question is if this behaviour is normal? I would expect that if the function is unable to connect to the service bus or a subscription for any reason, the error rate would be a few per 5/10s. Not that the function would try to connect once every few hundreds milliseconds and make you spend thousands of $ per day if you didn't set up an alert for this.

RohitRanjanMS commented 7 months ago

Hi @GABRIELNGBTUC ,

There's no way to reduce the volume of a specific type. You can filter-out these logs based on category and level, but that not what you want. You can set maxTelemetryItemsPerSecond to a right value, default is 20. This will impact all telemetry types as well.