Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Processing stucks after getting SessionLockLostException #26

Closed
alrod opened this issue Sep 21, 2019 · 7 comments
Closed

Processing stucks after getting SessionLockLostException #26

alrod opened this issue Sep 21, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@alrod
Copy link
Member

alrod commented Sep 21, 2019

Following code process a message only once using Microsoft.Azure.ServiceBus 3.4.0. (current package we are using in the extension) and then stcuks. The same code works fine using Microsoft.Azure.ServiceBus 4.0.0. Need to update to Microsoft.Azure.ServiceBus 4.0.0.

    static void Main(string[] args)
    {
        string cs = "";
        QueueClient client = new QueueClient(cs, "");

        SessionHandlerOptions options = new SessionHandlerOptions(ExceptionReceivedHandler)
        {
            MaxConcurrentSessions = 1,
            MaxAutoRenewDuration = TimeSpan.FromSeconds(30)
        };

        client.RegisterSessionHandler(ProcessSessionMessageAsync, options);
        Console.ReadLine();
    }

    static async Task ProcessSessionMessageAsync(IMessageSession session, Message message, CancellationToken cancellationToken)
    {
        Console.WriteLine($"Message delivary count: {message.SystemProperties.DeliveryCount}");
        await Task.Delay(50000);
    }

    static Task ExceptionReceivedHandler(ExceptionReceivedEventArgs args)
    {
        Console.WriteLine(args.Exception);
        return Task.CompletedTask;
    }
@ghost ghost added the Needs: triage 🔍 label Sep 21, 2019
@alrod alrod self-assigned this Oct 1, 2019
@alrod alrod added this to the Functions Sprint 60 milestone Oct 1, 2019
alrod added a commit to alrod/azure-functions-servicebus-extension that referenced this issue Oct 16, 2019
@alrod alrod modified the milestones: Functions Sprint 60, Epics Oct 16, 2019
@alrod alrod added the blocked label Oct 16, 2019
@alrod
Copy link
Member Author

alrod commented Oct 16, 2019

Blocked on Azure/azure-sdk-for-net#6410

@mpnow
Copy link

mpnow commented Oct 17, 2019

Hi @alrod, can you provide an update on what's happening with this bug? It's biting me on occasion in a production solution. Thanks!

@alrod
Copy link
Member Author

alrod commented Oct 19, 2019

@mpnow, once ServiceBus releases the fix for Azure/azure-sdk-for-net#6410 I will merge PR to update ServiceBus SDK. Probably ServiceBus will release new ServiceBus SDK next week.

@mpnow
Copy link

mpnow commented Nov 11, 2019

Hi @alrod, it looks like ServiceBus SDK 4.1.1 is out now - is that the release you were waiting for?

alrod added a commit to alrod/azure-functions-servicebus-extension that referenced this issue Nov 14, 2019
@mpnow
Copy link

mpnow commented Dec 10, 2019

Hi @alrod, any news on getting this fix released? It's continuing to bite me periodically in a production app. Thanks!

@mpnow
Copy link

mpnow commented Dec 24, 2019

Hi @alrod, wondering if a fix for this is out yet or, if not, when it might be?

@alrod
Copy link
Member Author

alrod commented Jan 4, 2020

the fix is out, please use:
https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/4.1.0

@alrod alrod closed this as completed Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants