Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Compare different message receiving modes in queuing technology
Home
Azure
Compare different message receiving modes in queuing technology
0
votes
asked
Jul 3, 2023
in
Azure
by
Robin
Compare different message receiving modes in queuing technology
receivingmodes
azure
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jul 3, 2023
by
Robin
Receive Mode is the way in which messages can be retrieved from a queuing technology by a consumer:
Peek & Lease. Used by Azure Storage Queues. The lease duration is associated with the message, so is something that you specify when you send the message to the queue. Once a message is picked up by a consumer, it is not removed from the queue. Instead, a lease (i.e. time-based limit) is placed on the message (on the message level), before it is available for another consumer to process. So in case a service that is holding a resource dies, the resource is freed after the set timeout, and the scenario of deadlock is avoided.
Peek & Lock. Used by Azure Service Bus. The message is held in the queue, but a lock is put on the message which is held exclusively by the consumer. The lock can be renewed if needed. By default, this is set at 30 seconds but can be changed.
Receive & Delete. Used by Azure Service Bus. The message is considered consumed as soon as the Service Bus has transferred the message (i.e. the consuming application won’t be able to guarantee that the message has been fully processed. So if there’s an issue mid-processing, then the message could be lost). This scenario makes sense if the messages are low-value, but makes little sense in the banking scenario that we outlined earlier.
...