I am trying to bind ServiceBusTrigger for Azure functions 2.0 property called: Properties IDictionary as input parameter like this:
public static class Function1
{
[FunctionName("Function1")]
public static void Run([ServiceBusTrigger("topic-name", "subscription-name", Connection = "connection-string")]string mySbMsg, string messageId, string correlationId, IDictionary<string,object> properties, ILogger log)
{
log.LogInformation($"C# ServiceBus topic trigger function processed message: {mySbMsg}");
}
}
I got error:
Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1.Run'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'properties' to type IDictionary`2. Make sure the parameter Type is supported by the binding. 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.).
As a source I am using: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus documentation.
MessageId & CorrelationId work fine. How to get: Properties IDictionary<< String,Object >> The application specific message properties ?