Closed mronnlun closed 4 years ago
I'm stuck here as well. Anyone knows how to get IMessageSession from a FunctionApp service bus trigger?
You need to bind to IMessageSession messageSession
.
I did the same thing as @mronnlun .
I thought this was the way to do it, but I got the same error as him.
What's the correct way to bind to IMessageSession
?
The function parameter name must be messageSession
https://github.com/Azure/azure-functions-servicebus-extension/blob/dev/test/Microsoft.Azure.WebJobs.Extensions.ServiceBus.Tests/ServiceBusSessionsEndToEndTests.cs#L397
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
I have this function
[FunctionName("MyFunction")] public static async Task Run([ServiceBusTrigger("myqueue", Connection = "MyBusConnString", IsSessionsEnabled = true)]Message message, IMessageSession session, ILogger log)
When executing I get this error:
I am referencing the following nuget packages: Microsoft.Azure.WebJobs.Extensions.ServiceBus version 4.1.1 Microsoft.NET.Sdk.Functions version 3.0.7
How can I access the session from the function?