The lock supplied is invalid. in AzureServiceBus
See original GitHub issueI have longtime operations I use UseRenewLock(TimeSpan.FromSeconds(30)) and and MaxConcurrentCalls = 10; UseServiceBusMessageScheduler();
sometimes My messages were sent to *-error query. With next error: “The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. Reference:3c6051a7-5bf8-41c3-a3f9-bb06c74c5705, TrackingId:d8a04e65-2741-4451-b0dd-2839bac8c4b8_B11, SystemTracker:brightinfoeventsdev:Queue:ispruncommand, Timestamp:2/15/2017 7:04:44 PM”,
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)\r\n
at Microsoft.ServiceBus.Messaging.ReceiveContext.EndRenewLock(IAsyncResult result)\r\n
at Microsoft.ServiceBus.Messaging.BrokeredMessage.EndRenewLock(IAsyncResult result)\r\n
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)\r\n
at MassTransit.AzureServiceBusTransport.Pipeline.RenewLockFilter.RenewLockScope.<LockRenewal>d__5.MoveNext()\r\n
at MassTransit.AzureServiceBusTransport.Pipeline.RenewLockFilter.<Send>d__3.MoveNext()\r\n
at MassTransit.Pipeline.Filters.DeserializeFilter.<Send>d__4.MoveNext()\r\n
at GreenPipes.Filters.RescueFilter`2.<GreenPipes-IFilter<TContext>-Send>d__5.MoveNext()",
Message Details (from error query): “SendTime”: “2017-02-15T18:57:54.414Z”, “enqueuedTimeUtc”: “2017-02-15T19:06:33.363Z”, “MT-Fault-Timestamp”: “2017-02-15T19:06:28.6723840Z”, “expiresAtUtc”: “2017-03-05T19:47:02.291Z”,
Can you help me
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (5 by maintainers)

Top Related StackOverflow Question
I found solution MassTransit uses TransportType.Amqp by default and when I switched to NetMessaging protocol the Error disappeared
@phatboyg After the upgrade as you suggested the exception goes away. thanks