Azure / Azure/azure-functions-core-tools

ServiceBus extension: Unable to configure binding 'outputSbQueue' of type 'serviceBus'

Open
#392 0 comments 0 reactions 0 assignees View on GitHub
investigate
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
4d 20h
Merged PRs (30d)
14

Description

Trying to see if I can get the ServiceBus binding extension working in a v2 function but not having any luck. When I start the function from the CLI I get this warning and error:

[3/1/2018 5:11:19 PM] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
[3/1/2018 5:11:19 PM] Job host started
[3/1/2018 5:11:19 PM] The following 1 functions are in error:
[3/1/2018 5:11:19 PM] ContentStatus: Unable to configure binding 'outputSbQueue' of type 'serviceBus'. This may indicate invalid function.json properties. Can't figure out which ctor to call.

I've installed the ServiceBus extension, installing the `beta411232` package from MyGet to get around the [extension initialization](https://github.com/Azure/azure-webjobs-sdk/pull/1495) issue and manually editing the `extensions.json` file to include the reference to the ServiceBus extension:

{
"extensions":[
{ "name": "ServiceBusExtensionConfig", "typeName":"Microsoft.Azure.WebJobs.ServiceBus.Config.ServiceBusExtensionConfig, Microsoft.Azure.WebJobs.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null"}
]
}

My function declaration looks like this:

public static IActionResult Run(HttpRequest req, TraceWriter log, ICollector outputSbQueue)

functions.json looks like this:

{
"disabled": false,
"bindings": [
{
"authLevel": "function",
"name": "req",
"type": "httpTrigger",
"direction": "in"
},
{
"name": "$return",
"type": "http",
"direction": "out"
},
{
"type": "serviceBus",
"connection": "MyAppBus_RootManageSharedAccessKey_SERVICEBUS",
"name": "outputSbQueue",
"direction": "out",
"queueName": "statusqueue",
"accessRights":"manage"
}
]
}

Contributor guide

Open the contributing guide

Research direction

Start with the function declaration and functions.json shown in the issue, then inspect the CLI startup output and the manually edited extensions.json registration. Reproduce the binding configuration error and determine what change allows the ServiceBus output binding to load without the constructor error or the “No job functions found” warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.