title: What is the actual meaning, value and usage of Azure Service Bus' "at most once" delivery capability?
body: <p>The Service Bus <a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted#additional-information" rel="nofollow noreferrer">documentation</a> states that "the At-Most-Once semantic can be supported by using session state to store the application state and by using transactions to atomically receive messages and update the session state." "Session" here appears to refer to Service Bus' <a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sessions" rel="nofollow noreferrer">messaging sessions</a>, which include the ability to store arbitrary state. This mechanism lets you enroll state updates in transactions along with operations on messages.</p>
  
  <p>I see how this can be used to reliably maintain the state of an application that is using message sessions. If you can update application state and complete a message in the same transaction, a properly-implemented app could potentially die anywhere in execution, and on resume would be guaranteed to inherit a state that results in successful, in-order continued session processing (sample code is <a href="https://github.com/Azure/azure-service-bus/tree/master/samples/DotNet/Microsoft.Azure.ServiceBus/SessionState" rel="nofollow noreferrer">here</a>, though strangely it <a href="https://github.com/Azure/azure-service-bus/issues/267" rel="nofollow noreferrer">doesn't actually use transactions</a>, although I see how it could and what that would accomplish).</p>
  
  <p>What I don't see is how any of this translates to "at-most-once" delivery. Nothing about Service Bus, including updates to session state, can be enrolled in a distributed transaction. So what exactly does "at-most-once" mean, and what does it accomplish? And what distinguishing feature of Service Bus allows it to support "at-most-once" delivery when <a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted#foundational-capabilities" rel="nofollow noreferrer">Azure Storage queues do not</a>?</p>