I know (reading the msdn documentation here) that Windows Azure Storage Queues use a lease-based exclusive access strategy to the messages and Azure Service Bus Queues use a lock-based one. In both I can set the maximum duration of lock/lease. So, which are the most important differences between these two methods? Could someone provide a clear/short example? Thanks.
In both cases when you read a message, the message is locked (or leased) and others cannot access it. Difference is, for Storage Queue you can define the lease duration for the message itself (by default is 30 seconds, it can be up to 7 days) so you as the client (publisher) can specify this when pushing the message to the queue; whereas for Service Bus the lock duration is defined at the queue or topic level (default is also 30 seconds), so you as a client (publisher) cannot control this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With