7
votes

I open a fresh new azure functions project, my packages are:

  • Microsoft.Azure.WebJobs 3.0.0-beta4
  • Microsoft.Azure.WebJobs.ServiceBus 3.0.0-beta4
  • Microsoft.NET.Sdk.Functions 1.0.7
  • NETStandardLibrary 2.0.1

I use servicebustrigger and my function code is basic:

public static class Function1
{
    [FunctionName("OrderPusherFunction")]
    public static Task Run([ServiceBusTrigger("orders","orderpusher", Connection ="ServiceBus")]
    string myQueueItem, TraceWriter log)
    {
        log.Info($"C# Queue trigger function processed: {myQueueItem}");
        return Task.CompletedTask;
    }
}

I also have: Azure Functions Core Tools (2.0.1-beta.22) and Function Runtime Version: 2.0.11415.0

When i run, i get "The binding type 'serviceBusTrigger' is not registered" error, and the function does not get triggered. Anyone has an idea? This looks to me as a basic setup..

1

1 Answers

6
votes

Basically, in v2 ServiceBus trigger was moved out of the default installation into Extensibility model. You need to register Service Bus binding as an extension as per Binding Extensions Management.

Unfortunately, this is all work-in-progress, as there is a number of issues for Service Bus binding:

My advice would be to stick to v1 for now.