Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
585 stars 781 forks source link

Unable to use AppSetting % Binding For ServiceBusTriggerAttribute.Connection #416

Closed jimmytricks closed 2 years ago

jimmytricks commented 3 years ago

Description

I have a boiler plate Service Bus Trigger function. I want to use an app setting binding with %. I have a local.settings.json with these values so that I can test locally by connecting to the service bus. The % bindings get swapped out for QueueName but not for ServiceBusName.

Service bus app:

[FunctionName("ExampleFunc")]
public static void Run([ServiceBusTrigger("%QueueName%", Connection = "%ServiceBusName%")])

local.settings.json:

{
  "IsEncrypted": false,
  "Values": {
    "QueueName": "queueName",
    "ServiceBusName": "Endpoint=sb:...."
  }
}

Actual Behavior

  1. Error thrown:

Warning: Cannot find value named '%ServiceBusName%' in local.settings.json that matches 'connection' property set on 'serviceBusTrigger'.

Expected Behavior

  1. Expect that both QueueName and ServiceBusName are retrieved from local.settings.json
SeanFeldman commented 3 years ago

Wrong repo. This repo is for Broker related issues. Your chances are better with the Functions GitHub repo.

jimmytricks commented 3 years ago

Apologies Sean, I've posted it there too now. Thanks,

SeanFeldman commented 3 years ago

No worries. You might link to the new issue and close this one. Just in case someone stumbles into this closed issue they'd know where to go. Cheers.

SeanFeldman commented 3 years ago

The question was moved to https://github.com/Azure/Azure-Functions/issues/1874