Closed vijayrkn closed 2 years ago
Thank you for the feedback! We will check for the possibilities internally and update you with the findings.
we are investigating this further and will update you soon with the findings.
Hi @fabiocav could you please look into this?
@Ved2806, I tested with Microsoft.Azure.WebJobs.Extensions.ServiceBus 4.3.0 and it works as expected.
Function1.cs
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
namespace ServiceBusTest
{
public static class Function1
{
[FunctionName("Function1")]
public static async Task Run1([ServiceBusTrigger("alrod-topic", "alrod-sub", Connection = "AzureWebJobsMySBName", IsSessionsEnabled = true)]string myQueueItem, ILogger log)
{
log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
}
}
}
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureWebJobsMySBName": "{connection-string}"
}
}
Note you need to set SessionId
on sending a message as IsSessionsEnabled = true
.
After deploying in Azure you need to create the app setting AzureWebJobsMySBName
. local.settings.json
is only for local development.
Creating the bug on behalf of the VS customer: https://developercommunity.visualstudio.com/t/ServiceBus-TopicSubscription-Triggered-/1645874
From the customer: