SQL Trigger function breaks Service Bus Trigger bindings

Artur Kedzior 0 Reputation points
2025-02-18T16:54:03.0433333+00:00

https://github.com/Azure/azure-functions-host/issues/10852

We are getting the following error in Azure Portal on our function app overview:

https://github.com/user-attachments/assets/64a99603-f14e-4144-a24c-7c836d33605c

The following Application Settings are referenced in Function bindings but not configured in the Function App. This can cause execution errors

Function: fiz-azure-functions/SendCustomerVerificationEmail, Binding parameter: json, Application setting: ServiceBusConnectionStringV2

Time: 17-02-2025 10:05:29 UTC

This happens for all service bus trigger functions we have in the function app.

The app settings is present in Environment variables > App settings.

https://github.com/user-attachments/assets/2c2e18d4-f608-42fa-8c13-ffa025c94f2b

It does not matter if it is in Environment variables > App settings or Environment variables > Connection strings.

This happens only under these two conditions:

  1. We introduce SQL Trigger function
  2. We introduce SQL connection string bindings for the trigger.

When we remove either, service bus bindings work again and message errors disappear.

This is how SqlTrigger is defined:


public async Task Run([SqlTrigger("[dbo].[Customers]", "SqlServerConnectionString")] IReadOnlyList<SqlChange<Customer>> changes, FunctionContext context)

Environment variables > App settings


Key: SqlServerConnectionString

Value: Server=tcp:{azuresql},1433;Initial Catalog=fiz;Persist Security Info=False;User ID=fizfunctions;Password={pass};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

We have exactly the same setup in different Azure subscription which works correctly.

The project is using the following packages:


    <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.21.0" />

    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.SignalRService" Version="1.7.0" />

    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.17.0" />

    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Sql" Version="3.1.284" />

    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.1" />

    <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.2" />

    <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />

    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="5.0.0" />

    <PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="7.1.0" />

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,481 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.