I wrote this Azure Function and I'm able to invoke from a http request:
public static class ZendeskWebhookToServiceBus
{
[Function("ZendeskWebhookToServiceBus")]
[return: ServiceBus("functions", Connection = "ServiceBusConnection")]
public static string Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req,
FunctionContext executionContext)
{
return "{\"value\": 12345}";
}
}
The problem is that message will never hit Service Bus (no errors either). After a lot of tries I looked at the auto-generated function.json (that's actually called function.metadata in my machine) and what I observed is that the "Out biding" section seems wrong. I suppose type should be something like "servicebus" or maybe something like that.
"bindings": [
{
"name": "req",
"type": "HttpTrigger",
"direction": "In",
"authLevel": "Anonymous",
"methods": [
"get",
"post"
]
},
{
"name": "$return",
"type": "http",
"direction": "Out"
}
]
I'm using .Net SDK 5.0.301 w/ runtime 5.0.7 and the following imports:
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.12" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.0.3" OutputItemType="Analyzer" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="4.3.0" />
</ItemGroup>
Any sugestions?
