Is there a way to create azure function that will expect object of ServiceBusReceivedMessage
as parameter? like this:
[Function("Function1")]
public static void Run(
[ServiceBusTrigger("...", "...", Connection = "...")] ServiceBusReceivedMessage msg)
I have some extension methods created for this class so it would be useful for me to use this class.
I've notice this tutorial Azure Service Bus bindings for Azure Functions
I'm using .net 5 and I've installed via nuget package Microsoft.Azure.WebJobs.Extensions.ServiceBus with beta-5 version but when I try to receive a message i see this error:
Exception: Microsoft.Azure.Functions.Worker.Diagnostics.Exceptions.FunctionInputConverterException: Error converting 1 input parameters for Function 'Function1': Cannot convert input parameter 'msg' to type 'Azure.Messaging.ServiceBus.ServiceBusReceivedMessage' from type 'System.String'.
not sure if I miss something or if it's possible at all