FoundatioFx / Foundatio.AzureServiceBus

Foundatio Azure ServiceBus
Apache License 2.0
19 stars 15 forks source link

The lock supplied is invalid. Either the lock expired, or the message has already been removed #40

Open Bakanych opened 3 years ago

Bakanych commented 3 years ago

Hi guys, not sure what I'm doing wrongly, but I just specified AzureServiceBusConnectionString in appsettings.json and ran AzureServiceBusMessageBusTests. Almost all of them were failed with the similar error message

Error sending work item to worker: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or was received by a different receiver instance.

I had same issues when tried to use the latest nuget package.

Any ideas?

niemyjski commented 3 years ago

Can you provide more specifics on the message bus instance you created. Size / Features etc..

Bakanych commented 3 years ago

Hi @niemyjski , it's pretty standard one:

    "sku": {
        "name": "Standard",
        "tier": "Standard"
    },
    "type": "Microsoft.ServiceBus/Namespaces",
    "location": "West Europe",

ConnectionString looks like this:

Endpoint=sb://<name>.servicebus.windows.net/;SharedAccessKeyName=<keyname>;SharedAccessKey=<key>

Which kind of features can be an issue? I remember I created it using defaults.

niemyjski commented 3 years ago

Thanks for that, I'm double checked our build as tests should be running as part of the build, but that doesn't seem to be the case after looking :. I updated the test connection string and will run the tests locally. Is there any chance you could look into this?

Bakanych commented 3 years ago

Sure, I'll help with pleasure. Just let me know how :)

niemyjski commented 3 years ago

I'd start by debugging the unit tests and figure out why we are getting the lock id error, you may need to clone the foundatio project and locally update project references to step through.