Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
586 stars 776 forks source link

Break message lock #639

Open SeanFeldman opened 1 year ago

SeanFeldman commented 1 year ago

Currently, a message locked cannot be unlocked until the lease runs out. If the lock duration is set to 5 minutes, it will take up to 5 minutes to unlock the message. When developing, often there's a need to retry the same message while debugging. The only hacky workaround today to avoid wasting time on waiting is modifying one of the queue properties to reset the lock. An ability to break a message lock by message sequence number would be beneficial.

cc @EldertGrootenboer

EldertGrootenboer commented 1 year ago

This can be done by abandoning the message, isn't it? Or is this a specific use case, in which case, can you please let us know the exact use case?

SeanFeldman commented 1 year ago

Abandoning works if your code is the receiving code and has the message's lease. Otherwise, it doesn't. So when you have messages that their lock needs to be released (a client crashed or restarted in the testing process w/o being forced to wait for 5 mins - think of a worse use case with Durable Terminus).

EldertGrootenboer commented 1 year ago

Thank you for your explanation! We will add this to the backlog as a feature request. We are not considering this short-term, but if more people are interested in this please upvote, and we will keep tracking this.

SeanFeldman commented 1 year ago

We are not considering this short-term, but if more people are interested in this please upvote, and we will keep tracking this.

It's ok. I've got about 20 years until retirement 😉

EldertGrootenboer commented 11 months ago

Thank you for your feedback on this item, it helps us in our efforts to continuously prioritize the different requests we get from all our various feedback channels. We have added this feature in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this feature, as well as explain their scenarios.

EldertGrootenboer commented 5 months ago

This feature in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this feature, as well as explain their scenarios.