Robust Messaging using Azure Service Bus

Published Apr 10 2022 01:15 AM 4,884 Views
Microsoft

What is Service Bus

  • Fully managed enterprise Message Broker

  • Decouple applications and services from each other

  • Message Queues and Publish/Subscribe Topics

  • Load-balancing across Competing workers

  • High degree of Reliability and Throughput

 

What This Document will do?

  • Differentiate between Messages and Events

  • Look at the Orchestrators or Service Bus who can Produce and Consume Messages

  • Deep dive into Service Bus Concepts and Advanced Features

  • Detailed look at some of code examples for Producers and Consumers

  • Code examples discussed are available at Source Code

 

What is a Message?

about-service-bus-queue.png

 

about-service-bus-topic.png

 

  • Raw Data Produced by a service to be Consumed or Stored elsewhere

  • Contains the data that triggered the Message pipeline

  • Publisher of the Message has an expectation about how the Consumer handles the Message

  • Contract exists between the two sides

    • Who is sending the message?

    • What is the message?

    • Where is the message being sent?

 

Service Bus - Deep Dive

  • Intended for traditional enterprise applications which require Transactions, Ordering, Duplicate detection, and Instantaneous Consistency

  • Enables cloud-native applications to provide reliable state transition management for business processes

  • Facilitates Highly Secure and Reliable communication across hybrid cloud solutions and can connect existing on-premises systems to cloud solutions

  • Brokered Messaging system. It stores messages in a broker (for example, a queue) until the consuming party is ready to receive the messages

  • Available either as Data Streams or Event Batches

  • Reliable Asynchronous message delivery (enterprise messaging as a service) that requires polling

  • Advanced messaging features like FIFO, Sessions, Transaction Scopes, Dead-lettering and Filtering and Duplicate Detection

  • At least once delivery

  • Optional in-order delivery

 

Queues

about-service-bus-queue.png

  • Offer First In, First Out (FIFO) message delivery to one or more competing consumers

  • Receivers typically Receive and Process messages in the order in which they were added to the queue, and only one message consumer receives and processes each message

  • Producers (senders) and Consumers (receivers) do not have to be sending and receiving messages at the same time, because messages are stored durably in the queue

  • Producer does not have to wait for a reply from the Consumer in order to continue to process and send messages

  • Related benefit is Load Levelling which enables producers and consumers to send and receive messages at different rates

  • Brokered Transfer

brokered-messaging.png

  • Maximize Availability - delays arising in services won't have an immediate and direct impact on the application

  • Producer can continue to post messages to the queue even when the service isn't available or isn't currently processing messages

  • Consumer can process at its own pace, without being overloaded

  • Maximize Scalability because both the number of queues and the number of services can be varied to meet demand

Competing Consumer

competing-consumers.png

  • Multiple Receivers compete for messages on the same Queue

  • Provides Automatic Load Balancing of work to receivers volunteering for Jobs

  • Improves Reliability

    • Messages aren't sent to a specific service instance

    • A failed service instance won't block a Producer

    • Messages can be processed by any working service instance.

  • Scalable - The system can dynamically increase or decrease the number of instances of the consumer service as the volume of messages fluctuates.

  • Improve Resiliency

    • Consumer service instance reads and processes the Message as part of a transactional operation

    • If the Consumer service instance fails, this pattern can ensure that the message will be returned to the queue to be picked up and handled by another instance of the consumer service

Topics and Subscriptions

about-service-bus-topic.png

  • Provides a one-to-many form of communication, in a Publish/Subscribe pattern

  • Useful for scaling to large numbers of Recipients, each published message is made available to each subscription registered with the Topic

  • Messages are sent to a Topic and delivered to one or more associated subscriptions

 

Pre-Fetching

prefetching.png

  • Prefetch feature can be enabled for a Service Bus client

  • The Receiver acquires Additional no. of Messages than intended by the application initially

  • With Pre-fetching enabled, Service Bus behaves differently in the following two scenarios

    • Receive-and-Delete mode

      • Messages acquired into the Prefetch Buffer are no longer available in the queue

      • Messages exist in the in-memory Prefetch Buffer until received into the application

      • Messages are Irrecoverable or Lost, If the client application ends before the Messages are Received into the application

    • Peek-Lock mode

      • Messages fetched into the Prefetch Buffer are in a Locked state

      • In case the Prefetch Buffer is large and processing takes long than message lock period - the subscribing client has to take appropriate measures as per the requirement

      • If the Lock expires Silently in the Prefetch Buffer, the Message is treated as Abandoned and is again made available for retrieval from the Queue

      • If the requirement is to achieve High Reliability for message processing and processing takes significant work and time, the recommendation is to use the Prefetch feature conservatively, or not at all

      • If the requirement is to achieve High Throughput and message processing is generally quicker, faster, the recommendation is to go for Prefetch option and get significant throughput benefits

 

Service Bus - Reliability

Throttling

  • Throttling from an external system on which Service Bus depends

  • Throttling occurs from interactions with storage and compute resources

  • Enabling Partitioning on a Queue or Topic to reduce the probability of throttling

Issue for an Azure dependency

  • Issue for a system on which Service Bus depends. For example, a given part of storage can encounter issues

  • To work around these types of issues, Service Bus regularly investigates and implements mitigations

  • Due to the nature of the mitigation, a sent message can take up to 15 minutes to appear in the affected queue or subscription and be ready for a receive operation

Service Bus failure on a single subsystem

  • Failure of Service Bus on single subsystem. In this situation, a compute node can get into an inconsistent state and must restart itself, causing all entities it serves to load balance to other nodes. This in turn can cause a short period of slow message processing

  • The client application generates a System.TimeoutException or MessagingException exception. Service Bus contains a mitigation for this issue in the form of automated client retry logic. Once the retry period is exhausted and the message is not delivered

 

Peek Lock – At least once

peek-lock.png

  • Sender sends the messages.

  • Receiver locks the message from other receivers.

  • The next Receiver locks the next message.

  • Complete removes the message from the queue.

  • Abandon gives up lock and makes it available for the next receiver

 

Receive and Delete – At most once

receive-n-delete.png

  • Sender sends the messages

  • Receiver receives the message and deletes from the queue

  • The next receiver receives and Deletes the next message

  • Abandon and Complete operations are not needed

 

Message Sessions

sb-sessions.png

  • Sessions allow pinning sets of related sets of related messages to a receiver even when using competing consumers

  • Session state may be used to store intermediate state for a session

  • A Session Receiver is created by a client accepting a session

  • When the session is accepted and held by a client, the client holds an exclusive lock on all messages with that session's session ID in the queue or subscription. It will also hold exclusive locks on all messages with the session ID that will arrive later

  • The Lock is released when you call close methods on the receiver or when the lock Expires. There are methods on the receiver to Renew the locks as well

  • When multiple Concurrent Receivers pull from the Queue, the messages belonging to a particular Session are dispatched to the specific Receiver that currently holds the lock for that session

  • The Session Lock held by the session receiver is an umbrella for the message locks used by the peek-lock settlement mode

  • Only one Receiver can have a lock on a session

  • A Receiver may have many in-flight messages, but the messages will be received in order

  • Abandoning a message causes the same message to be served again with the next receive operation

sessions-2.png

 

 

Duplicate Detection

  • Helps keep track of the application-controlled MessageId of all messages sent into a queue or topic during a specified time window

  • If any new message is sent with MessageId that was logged during the time window, the message is reported as accepted (the send operation succeeds)

  • Newly sent message is instantly Ignored and Dropped. No other parts of the message other than the MessageId are considered

  • Application control of the Identifier is essential, because only that allows the application to tie the MessageId to a business process context from which it can be predictably reconstructed when a failure occurs

  • Duplicate detection history time window can be configured during which message-ids are retained. This value defaults to 10 minutes for queues and topics, with a minimum value of 20 seconds to maximum value of 7 days

  • Enabling duplicate detection and the size of the window directly impact the queue (and topic) throughput, since all recorded message-ids must be matched against the newly submitted message identifier

  • Keeping the window small means that fewer message-ids must be retained and matched and hence less impact on Throughput

  • For high throughput entities that require Duplicate Detection, ideally keep the window as small as possible

 

 

Schedule Messages

  • You can submit messages to a queue or topic for delayed processing; for example, to schedule a job to become available for processing by a system at a certain time. This capability realizes a reliable distributed time-based scheduler.

  • Scheduled messages do not materialize in the queue until the defined enqueue time. Before that time, scheduled messages can be canceled. Cancellation deletes the message

  • The SequenceNumber for a scheduled message is only valid while the message is in this state. As the message transitions to the active state, the message is appended to the queue as if had been enqueued at the current instant, which includes assigning a new SequenceNumber

  • Because the feature is anchored on individual messages and messages can only be enqueued once, Service Bus does not support recurring schedules for messages

 

 

Dead Letter Messages

dead-letter.png

  • A Secondary sub-queue, called a Dead-Letter queue (DLQ)

  • The dead-letter queue doesn't need to be explicitly created

  • Can't be deleted or managed independent of the main entity

  • Holds Messages that can't be delivered to any receiver, or Messages that couldn't be processed

  • Messages can then be removed from the DLQ and inspected. An application might rectify issues and resubmit the message

  • Several Activities in Service Bus can cause messages to get pushed to the DLQ

  • Receiving Application can also explicitly move messages to the DLQ

 

 

Deferred Messages

defer-messages.png

  • Deferral is a feature created specifically for workflow processing scenarios. Workflow frameworks may require certain operations to be processed in a particular order

  • They may have to postpone processing of some received messages until prescribed prior work that's informed by other messages has been completed

  • Ultimately, deferral aids in reordering messages from the arrival order into an order in which they can be processed, while leaving those messages safely in the message store for which processing needs to be postponed

  • If a message can't be processed because a particular resource for handling that message is temporarily unavailable but message processing shouldn't be summarily suspended, a way to put that message on the side for a few minutes is to remember the sequence number in a scheduled message to be posted in a few minutes, and re-retrieve the deferred message when the scheduled message arrives

  • If a message handler depends on a database for all operations and that database is temporarily unavailable, it shouldn't use deferral, but rather suspend receiving messages altogether until the database is available again

 

Retrieving deferred messages

  • Deferred messages remain in the main queue along with all other active messages (unlike dead-letter messages that live in a subqueue), but they can no longer be received using the regular receive operations. Deferred messages can be discovered via message browsing if an application loses track of them

  • To retrieve a deferred message, its owner is responsible for remembering the sequence number as it defers it

  • Any receiver that knows the sequence number of a deferred message can later receive the message by using receive methods that take the sequence number as a parameter. For more information about sequence numbers, see Message sequencing and timestamps

 

Auto Forwarding

auto-forwarding.png

  • If the destination entity accumulates too many messages and exceeds the quota, or the destination entity is disabled, the source entity adds the messages to its dead-letter queue until there is space in the destination (or the entity is re-enabled)

  • Messages continue to live in the dead-letter queue, so you must explicitly receive and process them from the dead-letter queue

  • A first-level topic with 20 subscriptions, each of them chained to a second-level topic with 200 subscriptions, allows for higher throughput than a first-level topic with 200 subscriptions, each chained to a second-level topic with 20 subscriptions

  • To create a subscription that is chained to another queue or topic, the creator of the subscription must have Manage permissions on both the source and the destination entity. Sending messages to the source topic only requires Send permissions on the source topic

  • Messages that exceed 4 hops are dead-lettered

sb-fwd-1.gifsb-fwd-2.gif

 

 

Transaction Processing

transaction-processing.png

  • Groups two or more operations together into an execution scope

  • Ensure that all Operations belonging to a given group of operations either Succeed or Fail jointly

  • Transactions act as one unit, which is often referred to as atomicity

  • Send several messages to one Queue/Topic from within a transaction scope

    • Messages will only be committed when the Transaction successfully completes.

  • Operations available within a transaction scope -

    • Send

    • Complete

    • Abandon

    • Dead letter

    • Defer

    • Renew lock

  • Message from Sender reaches Transfer Queue or Topic

    • Transfer Queue or Topic immediately moves the message to the intended Destination Queue or Topic

    • Message is never Committed to the Transfer Queue or Topic and hence is not visible to the Consumers

  • Order of Transactions within the Transaction Scope is important; e,.g.

    • Receive - Read from the Transfer Queue or Topic

    • Send1 - Send to Queue1 or Topic1

    • Send2 - Send to Queue2 or Topic2

 

 

Code Examples

How to Send Messages

SendQueueMessageAsync

 

private async Task<ResponseModel> SendQueueMessageAsync
                                          (string queueNameString, HeaderModel headerModel,
                                           List<MessageModel> messagesList)
{

    kServiceBusClient = new ServiceBusClient(headerModel.ConnectionString);
    var serviceBusSender = kServiceBusClient.CreateSender(queueNameString);            
    var serviceBusMessagesList = PrepareAllQueueMessages(messagesList);
    ResponseModel responseModel = null;

    try
    {

      await serviceBusSender.SendMessagesAsync(serviceBusMessagesList);
      responseModel = new ResponseModel()
      {

        Code = 200,
        Message = $"message batch sent:{serviceBusMessagesList.Count}"

      };
    }
    catch(ServiceBusException ex)
    {

      responseModel = new ResponseModel()
      {

        Code = 400,
        Message = ex.Message

      };
    }
    finally
    {
      await serviceBusSender.DisposeAsync();
    }

    return responseModel;

}

 

 

 

ScheduleQueueMessageAsync

 

private async Task<List<ResponseModel>> ScheduleQueueMessageAsync
                                                (string queueNameString,
                                                 HeaderModel headerModel,
                                                 List<MessageModel> messagesList,
                                                 Dictionary<string, int> queryStringMap)
{

    kServiceBusClient = new ServiceBusClient(headerModel.ConnectionString);
    var serviceBusSender = kServiceBusClient.CreateSender(queueNameString);            
    var serviceBusMessagesList = PrepareAllQueueMessages(messagesList);                
    int delayMinutes = (int)(queryStringMap["delayBy"])/60;
    long scheduleSequence = 0;            
    var responseModelsList = new List<ResponseModel>();

    try
    {

      var scheduledTasksList = serviceBusMessagesList.Select
        (async (ServiceBusMessage serviceBusMessage) =>
         {

           scheduleSequence = await serviceBusSender.ScheduleMessageAsync
             (serviceBusMessage,
              DateTimeOffset.Now.AddMinutes(delayMinutes));
           var responseModel = new ResponseModel()
           {

             Code = 200,
             Message = $"message scheduled:{scheduleSequence}"

           };
           responseModelsList.Add(responseModel);

         }).ToList();

      await Task.WhenAll(scheduledTasksList);

    }
    catch (ServiceBusException ex)
    {

      var responseModel = new ResponseModel()
      {

        Code = 400,
        Message = ex.Message

      };
      responseModelsList.Add(responseModel);

    }
    finally
    {
      await serviceBusSender.DisposeAsync();
    }

    return responseModelsList;

}

 

 

 

How to Receive Messages

ReadFromDeadLetterQueue

 

public async Task<IActionResult> ReadFromDeadLetterQueue
                                         (string queueNameString,
                                         [FromHeader] HeaderModel headerModel)
{

    kServiceBusClient = new ServiceBusClient(headerModel.ConnectionString);
    var deadLetterReceiver = kServiceBusClient.CreateReceiver(queueNameString,
		new ServiceBusReceiverOptions()
		{

				SubQueue = SubQueue.DeadLetter,
        ReceiveMode = ServiceBusReceiveMode.ReceiveAndDelete

    });                                                              

    MessageModel receivedModel = null;
    ErrorModel errorModel = null;

    try
    {

      var receivedMessage = await deadLetterReceiver.ReceiveMessageAsync(kWaitTimeSpan);
      if (receivedMessage == null)
        throw new ArgumentNullException(nameof(receivedMessage));

      receivedModel = JsonConvert.DeserializeObject<MessageModel>
        (Encoding.UTF8.GetString(receivedMessage.Body));
      if (receivedModel == null)
        throw new ArgumentNullException(nameof(receivedModel));

    }
    catch (ArgumentNullException ex)            
    {

      errorModel = new ErrorModel()
      {

        Code = 500,
        Message = ex.Message

      };

    }
    catch (ServiceBusException ex)
    {

      errorModel = new ErrorModel()
      {

        Code = 500,
        Message = ex.Message

      };
    }
    finally
    {

      await deadLetterReceiver.DisposeAsync();

    }

    return Ok((receivedModel != null) ? receivedModel : errorModel);

}

 

 

 

Service Bus Listener

 

// Service Bus SDK client
private ServiceBusClient _serviceBusClient;

// Message processor for Service Bus
private ServiceBusProcessorOptions _serviceBusProcessorOptions;
private ServiceBusProcessor _serviceBusProcessor;

// Session based Message processor for Service Bus
private ServiceBusSessionProcessorOptions _serviceBusSessionProcessorOptions;
private ServiceBusSessionProcessor _serviceBusSessionProcessor;

....
public MessageProcessor(string connectionString)
{

  _connectionString = connectionString;
  _serviceBusClient = new ServiceBusClient(connectionString);

}

.....

 

 

 

public async Task StartProcessingAsync(MessageProcessorCallback messageProcessorCallback)
{

  _serviceBusProcessor.ProcessMessageAsync += (ProcessMessageEventArgs processMessageEventArgs) =>            
  {

    messageProcessorCallback.Invoke(processMessageEventArgs, null);
    return Task.CompletedTask;

  };

  _serviceBusProcessor.ProcessErrorAsync += (ProcessErrorEventArgs processErrorEventArgs) =>
  {                

    messageProcessorCallback.Invoke(null, processErrorEventArgs);
    return Task.CompletedTask;

  };

  await _serviceBusProcessor.StartProcessingAsync();

}

 

 

 

 

Start Message Processing for a Session

 

public async Task StartSessionProcessingAsync (MessageSessionProcessorCallback
                                               messageSessionProcessorCallback)
{

    _serviceBusSessionProcessor.ProcessMessageAsync +=
    (ProcessSessionMessageEventArgs processSessionMessageEventArgs) =>
    {

      messageSessionProcessorCallback.Invoke(processSessionMessageEventArgs, null);
      return Task.CompletedTask;

    };

    _serviceBusSessionProcessor.ProcessErrorAsync +=
    (ProcessErrorEventArgs processErrorEventArgs) =>
    {               

      messageSessionProcessorCallback.Invoke(null, processErrorEventArgs);
      return Task.CompletedTask;

    };

    await _serviceBusSessionProcessor.StartProcessingAsync();

}

 

 

 

How to perform Transaction processing

ForwardTopicAsync

 

public async Task<IActionResult> ForwardToTopicAsync
                                         (string topicNameString, string subscriptionNameString,
                                         [FromHeader] ForwardHeaderModel forwardHeaderModel,
                                         [FromQuery] Dictionary<string, string> queryStringMap)
{

    var serviceBusClientOptions = new ServiceBusClientOptions()
    {

      EnableCrossEntityTransactions = true,                
      TransportType = ServiceBusTransportType.AmqpTcp

    };

    kServiceBusClient = new ServiceBusClient(forwardHeaderModel.ConnectionString,
                                             serviceBusClientOptions);
    var serviceBusReceiverOptions = new ServiceBusReceiverOptions()
    {

      PrefetchCount = 2,
      ReceiveMode = ServiceBusReceiveMode.PeekLock              

    };

    ServiceBusReceiver serviceBusReceiver = null;
    ServiceBusSender nextHopSender = null;
    OCRModel receivedModel = null;
    ErrorModel errorModel = null;

    try
    {

      var sessionNameString = queryStringMap["session"];                
      var nextHopTopicNameString = forwardHeaderModel.NextHopTopicName;                
      var nextHopSessionNameString = forwardHeaderModel.NextHopSessionName;

      serviceBusReceiver = kServiceBusClient.CreateReceiver
        (topicNameString, subscriptionNameString,
         serviceBusReceiverOptions);
      nextHopSender = kServiceBusClient.CreateSender(nextHopTopicNameString);

      var receivedMessage = await serviceBusReceiver?.ReceiveMessageAsync(kWaitTimeSpan);                                            
      if (receivedMessage == null)
        throw new ArgumentNullException(nameof(receivedMessage));

      receivedModel = JsonConvert.DeserializeObject<OCRModel>
        (Encoding.UTF8.GetString(receivedMessage.Body));
      if (receivedModel == null)
        throw new ArgumentNullException(nameof(receivedModel));

      using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
      {

        await serviceBusReceiver.CompleteMessageAsync(receivedMessage);

        var serviceBusMessage = new ServiceBusMessage(receivedMessage);
        serviceBusMessage.TransactionPartitionKey = receivedMessage.PartitionKey;
        serviceBusMessage.SessionId = nextHopSessionNameString;

        await nextHopSender.SendMessageAsync(serviceBusMessage);
        ts.Complete();

      }
    }
    catch (ArgumentNullException ex)
    {

      errorModel = new ErrorModel()
      {

        Code = 400,
        Message = ex.Message

      };

    }
    catch (ServiceBusException ex)
    {

      errorModel = new ErrorModel()
      {

        Code = 500,
        Message = ex.Message

      };

    }
    finally
    {

      if (serviceBusReceiver != null)
        await serviceBusReceiver.DisposeAsync();

      if (nextHopSender != null)
        await nextHopSender.DisposeAsync();

    }

    return Ok((receivedModel != null) ? receivedModel : errorModel);

}

 

 

 

References

%3CLINGO-SUB%20id%3D%22lingo-sub-3275225%22%20slang%3D%22en-US%22%3ERobust%20Messaging%20using%20Azure%20Service%20Bus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3275225%22%20slang%3D%22en-US%22%3E%3CH2%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-393785720%22%20id%3D%22toc-hId-415890732%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EWhat%20is%20Service%20Bus%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EFully%20managed%20enterprise%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%20Broker%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDecouple%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20applications%20and%20services%20from%20each%20other%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EQueues%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20Publish%2FSubscribe%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopics%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ELoad-balancing%20across%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ECompeting%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20workers%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EHigh%20degree%20of%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReliability%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EThroughput%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--1413668743%22%20id%3D%22toc-hId--1391563731%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1073844090%22%20id%3D%22toc-hId-1095949102%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EWhat%20This%20Document%20will%20do%3F%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDifferentiate%20between%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EEvents%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ELook%20at%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EOrchestrators%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20Service%20Bus%20who%20can%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProduce%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsume%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20Messages%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDeep%20dive%20into%20Service%20Bus%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConcepts%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAdvanced%20Features%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDetailed%20look%20at%20some%20of%20code%20examples%20for%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProducers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3ECode%20examples%20discussed%20are%20available%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmonojit18%2FAzIntegrationServices%2Ftree%2Fmain%2FServiceBus%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESource%20Code%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--733610373%22%20id%3D%22toc-hId--711505361%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EWhat%20is%20a%20Message%3F%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22about-service-bus-queue.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362634iC8E9D73328F9E999%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22about-service-bus-queue.png%22%20alt%3D%22about-service-bus-queue.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22about-service-bus-topic.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362635iCAAE99402A87E1E7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22about-service-bus-topic.png%22%20alt%3D%22about-service-bus-topic.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ERaw%20Data%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EProduced%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20by%20a%20service%20to%20be%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumed%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EStored%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20elsewhere%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EContains%20the%20data%20that%20triggered%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20pipeline%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPublisher%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20of%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20has%20an%20expectation%20about%20how%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20handles%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EContract%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20exists%20between%20the%20two%20sides%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EWho%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20sending%20the%20message%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EWhat%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20the%20message%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EWhere%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20is%20the%20message%20being%20sent%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1753902460%22%20id%3D%22toc-hId-1776007472%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EService%20Bus%20-%20Deep%20Dive%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIntended%20for%20traditional%20enterprise%20applications%20which%20require%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransactions%2C%20Ordering%2C%20Duplicate%20detection%2C%20and%20Instantaneous%20Consistency%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EEnables%20cloud-native%20applications%20to%20provide%20reliable%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Estate%20transition%20management%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20for%20business%20processes%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EFacilitates%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EHighly%20Secure%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReliable%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20communication%20across%20hybrid%20cloud%20solutions%20and%20can%20connect%20existing%20on-premises%20systems%20to%20cloud%20solutions%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EBrokered%20Messaging%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20system.%20It%20stores%20messages%20in%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Ebroker%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Efor%20example%2C%20a%20queue%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%20until%20the%20consuming%20party%20is%20ready%20to%20receive%20the%20messages%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EAvailable%20either%20as%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EData%20Streams%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EEvent%20Batches%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReliable%20Asynchronous%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20message%20delivery%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Eenterprise%20messaging%20as%20a%20service%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%20that%20requires%20polling%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EAdvanced%20messaging%20features%20like%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EFIFO%2C%20Sessions%2C%20Transaction%20Scopes%2C%20Dead-lettering%20and%20Filtering%20and%20Duplicate%20Detection%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAt%20least%20once%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20delivery%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EOptional%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Ein-order%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20delivery%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1850503362%22%20id%3D%22toc-hId--1828398350%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EQueues%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22about-service-bus-queue.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362640i6F43F152EBBAA9EC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22about-service-bus-queue.png%22%20alt%3D%22about-service-bus-queue.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EOffer%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EFirst%20In%2C%20First%20Out%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EFIFO%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%20message%20delivery%20to%20one%20or%20more%20competing%20consumers%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EReceivers%20typically%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceive%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProcess%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20messages%20in%20the%20order%20in%20which%20they%20were%20added%20to%20the%20queue%2C%20and%20only%20one%20message%20consumer%20receives%20and%20processes%20each%20message%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProducers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Esenders%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Ereceivers%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%20do%20not%20have%20to%20be%20sending%20and%20receiving%20messages%20at%20the%20same%20time%2C%20because%20messages%20are%20stored%20durably%20in%20the%20queue%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProducer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20does%20not%20have%20to%20wait%20for%20a%20reply%20from%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20in%20order%20to%20continue%20to%20process%20and%20send%20messages%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3ERelated%20benefit%20is%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ELoad%20Levelling%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20which%20enables%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Eproducers%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Econsumers%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20to%20send%20and%20receive%20messages%20at%20different%20rates%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EBrokered%20Transfer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22brokered-messaging.png%22%20style%3D%22width%3A%20761px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362641iACD9F3B530406FF5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22brokered-messaging.png%22%20alt%3D%22brokered-messaging.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMaximize%20Availability%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20-%20delays%20arising%20in%20services%20won't%20have%20an%20immediate%20and%20direct%20impact%20on%20the%20application%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProducer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20continue%20to%20post%20messages%20to%20the%20queue%20even%20when%20the%20service%20isn't%20available%20or%20isn't%20currently%20processing%20messages%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20process%20at%20its%20own%20pace%2C%20without%20being%20overloaded%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMaximize%20Scalability%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20because%20both%20the%20number%20of%20queues%20and%20the%20number%20of%20services%20can%20be%20varied%20to%20meet%20demand%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ECompeting%20Consumer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22competing-consumers.png%22%20style%3D%22width%3A%20768px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362642i08766BCE7F1C5908%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22competing-consumers.png%22%20alt%3D%22competing-consumers.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EMultiple%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceivers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20compete%20for%20messages%20on%20the%20same%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EProvides%20Automatic%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ELoad%20Balancing%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20of%20work%20to%20receivers%20volunteering%20for%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EJobs%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EImproves%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReliability%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20aren't%20sent%20to%20a%20specific%20service%20instance%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EA%20failed%20service%20instance%20won't%20block%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EProducer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20be%20processed%20by%20any%20working%20service%20instance.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EScalable%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20-%20The%20system%20can%20dynamically%20increase%20or%20decrease%20the%20number%20of%20instances%20of%20the%20consumer%20service%20as%20the%20volume%20of%20messages%20fluctuates.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EImprove%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EResiliency%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20service%20instance%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Ereads%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Eprocesses%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20as%20part%20of%20a%20transactional%20operation%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIf%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20service%20instance%20fails%2C%20this%20pattern%20can%20ensure%20that%20the%20message%20will%20be%20returned%20to%20the%20queue%20to%20be%20picked%20up%20and%20handled%20by%20another%20instance%20of%20the%20consumer%20service%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-637009471%22%20id%3D%22toc-hId-659114483%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ETopics%20and%20Subscriptions%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22about-service-bus-topic.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362643iB23F384BA9EB9246%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22about-service-bus-topic.png%22%20alt%3D%22about-service-bus-topic.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EProvides%20a%20one-to-many%20form%20of%20communication%2C%20in%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPublish%2FSubscribe%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20pattern%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EUseful%20for%20scaling%20to%20large%20numbers%20of%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ERecipients%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20each%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Epublished%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20message%20is%20made%20available%20to%20each%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Esubscription%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20registered%20with%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20are%20sent%20to%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20delivered%20to%20one%20or%20more%20associated%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Esubscriptions%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1327570945%22%20id%3D%22toc-hId-1349675957%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--479883518%22%20id%3D%22toc-hId--457778506%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EPre-Fetching%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22prefetching.png%22%20style%3D%22width%3A%20886px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362644i172062391B348396%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22prefetching.png%22%20alt%3D%22prefetching.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20feature%20can%20be%20enabled%20for%20a%20Service%20Bus%20client%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20acquires%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAdditional%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20no.%20of%20Messages%20than%20intended%20by%20the%20application%20initially%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EWith%20Pre-fetching%20enabled%2C%20Service%20Bus%20behaves%20differently%20in%20the%20following%20two%20scenarios%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fmessage-transfers-locks-settlement%23receiveanddelete%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EReceive-and-Delete%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20mode%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%20acquired%20into%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%20Buffer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20are%20no%20longer%20available%20in%20the%20queue%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%20exist%20in%20the%20in-memory%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%20Buffer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20until%20received%20into%20the%20application%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%20are%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EIrrecoverable%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ELost%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20If%20the%20client%20application%20ends%20before%20the%20Messages%20are%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceived%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20into%20the%20application%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fmessage-transfers-locks-settlement%23peeklock%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EPeek-Lock%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20mode%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20fetched%20into%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%20Buffer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20are%20in%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ELocked%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20state%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIn%20case%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%20Buffer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20large%20and%20processing%20takes%20long%20than%20message%20lock%20period%20-%20the%20subscribing%20client%20has%20to%20take%20appropriate%20measures%20as%20per%20the%20requirement%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIf%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ELock%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20expires%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESilently%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20in%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%20Buffer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20the%20Message%20is%20treated%20as%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAbandoned%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20is%20again%20made%20available%20for%20retrieval%20from%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIf%20the%20requirement%20is%20to%20achieve%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EHigh%20Reliability%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20for%20message%20processing%20and%20processing%20takes%20significant%20work%20and%20time%2C%20the%20recommendation%20is%20to%20use%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20feature%20conservatively%2C%20or%20not%20at%20all%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIf%20the%20requirement%20is%20to%20achieve%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EHigh%20Throughput%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20message%20processing%20is%20generally%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Equicker%2C%20faster%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20the%20recommendation%20is%20to%20go%20for%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPrefetch%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20option%20and%20get%20significant%20throughput%20benefits%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--490386622%22%20id%3D%22toc-hId--468281610%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EService%20Bus%20-%20Reliability%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1431045451%22%20id%3D%22toc-hId-1453150463%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThrottling%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThrottling%20from%20an%20external%20system%20on%20which%20Service%20Bus%20depends%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThrottling%20occurs%20from%20interactions%20with%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Estorage%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Ecompute%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20resources%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EEnabling%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EPartitioning%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20on%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20to%20reduce%20the%20probability%20of%20throttling%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--376409012%22%20id%3D%22toc-hId--354304000%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIssue%20for%20an%20Azure%20dependency%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIssue%20for%20a%20system%20on%20which%20Service%20Bus%20depends.%20For%20example%2C%20a%20given%20part%20of%20storage%20can%20encounter%20issues%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ETo%20work%20around%20these%20types%20of%20issues%2C%20Service%20Bus%20regularly%20investigates%20and%20implements%20mitigations%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDue%20to%20the%20nature%20of%20the%20mitigation%2C%20a%20sent%20message%20can%20take%20up%20to%2015%20minutes%20to%20appear%20in%20the%20affected%20queue%20or%20subscription%20and%20be%20ready%20for%20a%20receive%20operation%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-2111103821%22%20id%3D%22toc-hId-2133208833%22%3E%3CSPAN%20class%3D%22md-plain%22%3EService%20Bus%20failure%20on%20a%20single%20subsystem%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EFailure%20of%20Service%20Bus%20on%20single%20subsystem.%20In%20this%20situation%2C%20a%20compute%20node%20can%20get%20into%20an%20inconsistent%20state%20and%20must%20restart%20itself%2C%20causing%20all%20entities%20it%20serves%20to%20load%20balance%20to%20other%20nodes.%20This%20in%20turn%20can%20cause%20a%20short%20period%20of%20slow%20message%20processing%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20client%20application%20generates%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESystem.TimeoutException%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessagingException%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20exception.%20Service%20Bus%20contains%20a%20mitigation%20for%20this%20issue%20in%20the%20form%20of%20automated%20client%20retry%20logic.%20Once%20the%20retry%20period%20is%20exhausted%20and%20the%20message%20is%20not%20delivered%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-174566639%22%20id%3D%22toc-hId-196671651%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EPeek%20Lock%20%E2%80%93%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EAt%20least%20once%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peek-lock.png%22%20style%3D%22width%3A%20852px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362645iF20259C09119F6E3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22peek-lock.png%22%20alt%3D%22peek-lock.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESender%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20sends%20the%20messages.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20locks%20the%20message%20from%20other%20receivers.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20next%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20locks%20the%20next%20message.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EComplete%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20removes%20the%20message%20from%20the%20queue.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAbandon%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20gives%20up%20lock%20and%20makes%20it%20available%20for%20the%20next%20receiver%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1632887824%22%20id%3D%22toc-hId--1610782812%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EReceive%20and%20Delete%20%E2%80%93%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EAt%20most%20once%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22receive-n-delete.png%22%20style%3D%22width%3A%20657px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362646i2DF33685D99EC398%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22receive-n-delete.png%22%20alt%3D%22receive-n-delete.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESender%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20sends%20the%20messages%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20receives%20the%20message%20and%20deletes%20from%20the%20queue%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20next%20receiver%20receives%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDeletes%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20the%20next%20message%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAbandon%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EComplete%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20operations%20are%20not%20needed%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-854625009%22%20id%3D%22toc-hId-876730021%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EMessage%20Sessions%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sb-sessions.png%22%20style%3D%22width%3A%20788px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362647iA69646E3B0667D0D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sb-sessions.png%22%20alt%3D%22sb-sessions.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESessions%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20allow%20pinning%20sets%20of%20related%20sets%20of%20related%20messages%20to%20a%20receiver%20even%20when%20using%20competing%20consumers%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESession%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20state%20may%20be%20used%20to%20store%20intermediate%20state%20for%20a%20session%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EA%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESession%20Receiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20created%20by%20a%20client%20accepting%20a%20session%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EWhen%20the%20session%20is%20accepted%20and%20held%20by%20a%20client%2C%20the%20client%20holds%20an%20exclusive%20lock%20on%20all%20messages%20with%20that%20session's%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Esession%20ID%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20in%20the%20queue%20or%20subscription.%20It%20will%20also%20hold%20exclusive%20locks%20on%20all%20messages%20with%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Esession%20ID%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20that%20will%20arrive%20later%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ELock%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20released%20when%20you%20call%20close%20methods%20on%20the%20receiver%20or%20when%20the%20lock%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EExpires%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E.%20There%20are%20methods%20on%20the%20receiver%20to%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ERenew%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20the%20locks%20as%20well%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EWhen%20multiple%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConcurrent%20Receivers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20pull%20from%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20the%20messages%20belonging%20to%20a%20particular%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESession%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20are%20dispatched%20to%20the%20specific%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20that%20currently%20holds%20the%20lock%20for%20that%20session%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESession%20Lock%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20held%20by%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Esession%20receiver%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20an%20umbrella%20for%20the%20message%20locks%20used%20by%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Epeek-lock%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20settlement%20mode%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EOnly%20one%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20can%20have%20a%20lock%20on%20a%20session%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EA%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20may%20have%20many%20in-flight%20messages%2C%20but%20the%20messages%20will%20be%20received%20in%20order%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAbandoning%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%20a%20message%20causes%20the%20same%20message%20to%20be%20served%20again%20with%20the%20next%20receive%20operation%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sessions-2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362648iC25B310CD6986DD9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sessions-2.png%22%20alt%3D%22sessions-2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--952829454%22%20id%3D%22toc-hId--930724442%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1534683379%22%20id%3D%22toc-hId-1556788391%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDuplicate%20Detection%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EHelps%20keep%20track%20of%20the%20application-controlled%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessageId%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20of%20all%20messages%20sent%20into%20a%20queue%20or%20topic%20during%20a%20specified%20time%20window%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIf%20any%20new%20message%20is%20sent%20with%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessageId%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20that%20was%20logged%20during%20the%20time%20window%2C%20the%20message%20is%20reported%20as%20accepted%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Ethe%20send%20operation%20succeeds%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ENewly%20sent%20message%20is%20instantly%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EIgnored%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDropped%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E.%20No%20other%20parts%20of%20the%20message%20other%20than%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EMessageId%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20are%20considered%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EApplication%20control%20of%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EIdentifier%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20essential%2C%20because%20only%20that%20allows%20the%20application%20to%20tie%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EMessageId%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20to%20a%20business%20process%20context%20from%20which%20it%20can%20be%20predictably%20reconstructed%20when%20a%20failure%20occurs%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDuplicate%20detection%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20history%20time%20window%20can%20be%20configured%20during%20which%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Emessage-ids%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20are%20retained.%20This%20value%20defaults%20to%2010%20minutes%20for%20queues%20and%20topics%2C%20with%20a%20minimum%20value%20of%2020%20seconds%20to%20maximum%20value%20of%207%20days%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EEnabling%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Eduplicate%20detection%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20the%20size%20of%20the%20window%20directly%20impact%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Equeue%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20(and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Etopic%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%20throughput%2C%20since%20all%20recorded%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Emessage-ids%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20must%20be%20matched%20against%20the%20newly%20submitted%20message%20identifier%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EKeeping%20the%20window%20small%20means%20that%20fewer%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Emessage-ids%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20must%20be%20retained%20and%20matched%20and%20hence%20less%20impact%20on%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EThroughput%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EFor%20high%20throughput%20entities%20that%20require%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDuplicate%20Detection%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20ideally%20keep%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Ewindow%20as%20small%20as%20possible%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--272771084%22%20id%3D%22toc-hId--250666072%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ESchedule%20Messages%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EYou%20can%20submit%20messages%20to%20a%20queue%20or%20topic%20for%20delayed%20processing%3B%20for%20example%2C%20to%20schedule%20a%20job%20to%20become%20available%20for%20processing%20by%20a%20system%20at%20a%20certain%20time.%20This%20capability%20realizes%20a%20reliable%20distributed%20time-based%20scheduler.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EScheduled%20messages%20do%20not%20materialize%20in%20the%20queue%20until%20the%20defined%20enqueue%20time.%20Before%20that%20time%2C%20scheduled%20messages%20can%20be%20canceled.%20Cancellation%20deletes%20the%20message%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20SequenceNumber%20for%20a%20scheduled%20message%20is%20only%20valid%20while%20the%20message%20is%20in%20this%20state.%20As%20the%20message%20transitions%20to%20the%20active%20state%2C%20the%20message%20is%20appended%20to%20the%20queue%20as%20if%20had%20been%20enqueued%20at%20the%20current%20instant%2C%20which%20includes%20assigning%20a%20new%20SequenceNumber%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EBecause%20the%20feature%20is%20anchored%20on%20individual%20messages%20and%20messages%20can%20only%20be%20enqueued%20once%2C%20Service%20Bus%20does%20not%20support%20recurring%20schedules%20for%20messages%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--2080225547%22%20id%3D%22toc-hId--2058120535%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDead%20Letter%20Messages%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22dead-letter.png%22%20style%3D%22width%3A%20798px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362649i7F1F2F1576839E59%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22dead-letter.png%22%20alt%3D%22dead-letter.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EA%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESecondary%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Esub-queue%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20called%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDead-Letter%20queue%20(DLQ)%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThe%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Edead-letter%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20queue%20doesn't%20need%20to%20be%20explicitly%20created%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ECan't%20be%20deleted%20or%20managed%20independent%20of%20the%20main%20entity%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EHolds%20Messages%20that%20can't%20be%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Edelivered%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20to%20any%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Ereceiver%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%2C%20or%20Messages%20that%20couldn't%20be%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3Eprocessed%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%20can%20then%20be%20removed%20from%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDLQ%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Einspected%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E.%20An%20application%20might%20rectify%20issues%20and%20resubmit%20the%20message%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESeveral%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EActivities%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20in%20Service%20Bus%20can%20cause%20messages%20to%20get%20pushed%20to%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EDLQ%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceiving%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20Application%20can%20also%20explicitly%20move%20messages%20to%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3EDLQ%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1105449227%22%20id%3D%22toc-hId-1127554239%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDeferred%20Messages%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22defer-messages.png%22%20style%3D%22width%3A%20810px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362650i055244851796212D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22defer-messages.png%22%20alt%3D%22defer-messages.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EDeferral%20is%20a%20feature%20created%20specifically%20for%20workflow%20processing%20scenarios.%20Workflow%20frameworks%20may%20require%20certain%20operations%20to%20be%20processed%20in%20a%20particular%20order%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EThey%20may%20have%20to%20postpone%20processing%20of%20some%20received%20messages%20until%20prescribed%20prior%20work%20that's%20informed%20by%20other%20messages%20has%20been%20completed%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EUltimately%2C%20deferral%20aids%20in%20reordering%20messages%20from%20the%20arrival%20order%20into%20an%20order%20in%20which%20they%20can%20be%20processed%2C%20while%20leaving%20those%20messages%20safely%20in%20the%20message%20store%20for%20which%20processing%20needs%20to%20be%20postponed%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EIf%20a%20message%20can't%20be%20processed%20because%20a%20particular%20resource%20for%20handling%20that%20message%20is%20temporarily%20unavailable%20but%20message%20processing%20shouldn't%20be%20summarily%20suspended%2C%20a%20way%20to%20put%20that%20message%20on%20the%20side%20for%20a%20few%20minutes%20is%20to%20remember%20the%20sequence%20number%20in%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Escheduled%20message%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20to%20be%20posted%20in%20a%20few%20minutes%2C%20and%20re-retrieve%20the%20deferred%20message%20when%20the%20scheduled%20message%20arrives%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EIf%20a%20message%20handler%20depends%20on%20a%20database%20for%20all%20operations%20and%20that%20database%20is%20temporarily%20unavailable%2C%20it%20shouldn't%20use%20deferral%2C%20but%20rather%20suspend%20receiving%20messages%20altogether%20until%20the%20database%20is%20available%20again%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--702005236%22%20id%3D%22toc-hId--679900224%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ERetrieving%20deferred%20messages%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EDeferred%20messages%20remain%20in%20the%20main%20queue%20along%20with%20all%20other%20active%20messages%20(%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Eunlike%20dead-letter%20messages%20that%20live%20in%20a%20subqueue%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%2C%20but%20they%20can%20no%20longer%20be%20received%20using%20the%20regular%20receive%20operations.%20Deferred%20messages%20can%20be%20discovered%20via%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fmessage-browsing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3Emessage%20browsing%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20if%20an%20application%20loses%20track%20of%20them%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ETo%20retrieve%20a%20deferred%20message%2C%20its%20owner%20is%20responsible%20for%20remembering%20the%20sequence%20number%20as%20it%20defers%20it%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%22%3EAny%20receiver%20that%20knows%20the%20sequence%20number%20of%20a%20deferred%20message%20can%20later%20receive%20the%20message%20by%20using%20receive%20methods%20that%20take%20the%20sequence%20number%20as%20a%20parameter.%20For%20more%20information%20about%20sequence%20numbers%2C%20see%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fmessage-sequencing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%20sequencing%20and%20timestamps%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1785507597%22%20id%3D%22toc-hId-1807612609%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EAuto%20Forwarding%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22auto-forwarding.png%22%20style%3D%22width%3A%20939px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362651i0AFF668E0F3D3CCC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22auto-forwarding.png%22%20alt%3D%22auto-forwarding.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EIf%20the%20destination%20entity%20accumulates%20too%20many%20messages%20and%20exceeds%20the%20quota%2C%20or%20the%20destination%20entity%20is%20disabled%2C%20the%20source%20entity%20adds%20the%20messages%20to%20its%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fservice-bus-dead-letter-queues%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3Edead-letter%20queue%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20until%20there%20is%20space%20in%20the%20destination%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3E(or%20the%20entity%20is%20re-enabled%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E)%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%20continue%20to%20live%20in%20the%20dead-letter%20queue%2C%20so%20you%20must%20explicitly%20receive%20and%20process%20them%20from%20the%20dead-letter%20queue%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EA%20first-level%20topic%20with%2020%20subscriptions%2C%20each%20of%20them%20chained%20to%20a%20second-level%20topic%20with%20200%20subscriptions%2C%20allows%20for%20higher%20throughput%20than%20a%20first-level%20topic%20with%20200%20subscriptions%2C%20each%20chained%20to%20a%20second-level%20topic%20with%2020%20subscriptions%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3ETo%20create%20a%20subscription%20that%20is%20chained%20to%20another%20queue%20or%20topic%2C%20the%20creator%20of%20the%20subscription%20must%20have%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EManage%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20permissions%20on%20both%20the%20source%20and%20the%20destination%20entity.%20Sending%20messages%20to%20the%20source%20topic%20only%20requires%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESend%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20permissions%20on%20the%20source%20topic%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%20that%20exceed%204%20hops%20are%20dead-lettered%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sb-fwd-1.gif%22%20style%3D%22width%3A%20591px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362652iABD506EF07B3F3C7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sb-fwd-1.gif%22%20alt%3D%22sb-fwd-1.gif%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sb-fwd-2.gif%22%20style%3D%22width%3A%20506px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362653i73D73440F8E9F8DD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sb-fwd-2.gif%22%20alt%3D%22sb-fwd-2.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--21946866%22%20id%3D%22toc-hId-158146%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3ETransaction%20Processing%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22transaction-processing.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362654iC7E1F0484B60E8D9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22transaction-processing.png%22%20alt%3D%22transaction-processing.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EGroups%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20two%20or%20more%20operations%20together%20into%20an%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Eexecution%20scope%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EEnsure%20that%20all%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EOperations%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20belonging%20to%20a%20given%20group%20of%20operations%20either%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESucceed%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EFail%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20jointly%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransactions%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20act%20as%20one%20unit%2C%20which%20is%20often%20referred%20to%20as%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Eatomicity%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESend%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20several%20messages%20to%20one%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue%2FTopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20from%20within%20a%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3Etransaction%20scope%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessages%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20will%20only%20be%20committed%20when%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransaction%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20successfully%20completes.%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EOperations%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20available%20within%20a%20transaction%20scope%20-%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESend%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EComplete%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EAbandon%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDead%20letter%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDefer%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ERenew%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20lock%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%20from%20Sender%20reaches%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransfer%20Queue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransfer%20Queue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20immediately%20moves%20the%20message%20to%20the%20intended%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EDestination%20Queue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EMessage%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20never%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ECommitted%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20to%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransfer%20Queue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20and%20hence%20is%20not%20visible%20to%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EConsumers%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EOrder%20of%20Transactions%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20within%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CEM%3E%3CSPAN%20class%3D%22md-plain%22%3ETransaction%20Scope%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20is%20important%3B%20e%2C.g.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EReceive%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20-%20Read%20from%20the%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETransfer%20Queue%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESend1%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20-%20Send%20to%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue1%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic1%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ESend2%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20-%20Send%20to%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3EQueue2%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-plain%22%3E%20or%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22md-pair-s%20md-expand%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22md-plain%22%3ETopic2%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--1958484048%22%20id%3D%22toc-hId--1936379036%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20md-link%20md-expand%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmonojit18%2FAzIntegrationServices%2Ftree%2Fmain%2FServiceBus%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3ECode%20Examples%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-658111504%22%20id%3D%22toc-hId-680216516%22%3E%3CSPAN%20class%3D%22md-plain%22%3EHow%20to%20Send%20Messages%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--1020260240%22%20id%3D%22toc-hId--998155228%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESendQueueMessageAsync%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Eprivate%20async%20Task%3CRESPONSEMODEL%3E%20SendQueueMessageAsync%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(string%20queueNameString%2C%20HeaderModel%20headerModel%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20List%3CMESSAGEMODEL%3E%20messagesList)%0A%7B%0A%0A%20%20%20%20kServiceBusClient%20%3D%20new%20ServiceBusClient(headerModel.ConnectionString)%3B%0A%20%20%20%20var%20serviceBusSender%20%3D%20kServiceBusClient.CreateSender(queueNameString)%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20var%20serviceBusMessagesList%20%3D%20PrepareAllQueueMessages(messagesList)%3B%0A%20%20%20%20ResponseModel%20responseModel%20%3D%20null%3B%0A%0A%20%20%20%20try%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20await%20serviceBusSender.SendMessagesAsync(serviceBusMessagesList)%3B%0A%20%20%20%20%20%20responseModel%20%3D%20new%20ResponseModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20200%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20%24%22message%20batch%20sent%3A%7BserviceBusMessagesList.Count%7D%22%0A%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20catch(ServiceBusException%20ex)%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20responseModel%20%3D%20new%20ResponseModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20400%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20ex.Message%0A%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20finally%0A%20%20%20%20%7B%0A%20%20%20%20%20%20await%20serviceBusSender.DisposeAsync()%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20responseModel%3B%0A%0A%7D%3C%2FMESSAGEMODEL%3E%3C%2FRESPONSEMODEL%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1467252593%22%20id%3D%22toc-hId-1489357605%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EScheduleQueueMessageAsync%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Eprivate%20async%20Task%3CLIST%3E%3CRESPONSEMODEL%3E%26gt%3B%20ScheduleQueueMessageAsync%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(string%20queueNameString%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20HeaderModel%20headerModel%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20List%3CMESSAGEMODEL%3E%20messagesList%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Dictionary%3CSTRING%3E%20queryStringMap)%0A%7B%0A%0A%20%20%20%20kServiceBusClient%20%3D%20new%20ServiceBusClient(headerModel.ConnectionString)%3B%0A%20%20%20%20var%20serviceBusSender%20%3D%20kServiceBusClient.CreateSender(queueNameString)%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20var%20serviceBusMessagesList%20%3D%20PrepareAllQueueMessages(messagesList)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20int%20delayMinutes%20%3D%20(int)(queryStringMap%5B%22delayBy%22%5D)%2F60%3B%0A%20%20%20%20long%20scheduleSequence%20%3D%200%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20var%20responseModelsList%20%3D%20new%20List%3CRESPONSEMODEL%3E()%3B%0A%0A%20%20%20%20try%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20var%20scheduledTasksList%20%3D%20serviceBusMessagesList.Select%0A%20%20%20%20%20%20%20%20(async%20(ServiceBusMessage%20serviceBusMessage)%20%3D%26gt%3B%0A%20%20%20%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20scheduleSequence%20%3D%20await%20serviceBusSender.ScheduleMessageAsync%0A%20%20%20%20%20%20%20%20%20%20%20%20%20(serviceBusMessage%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20DateTimeOffset.Now.AddMinutes(delayMinutes))%3B%0A%20%20%20%20%20%20%20%20%20%20%20var%20responseModel%20%3D%20new%20ResponseModel()%0A%20%20%20%20%20%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20Code%20%3D%20200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20Message%20%3D%20%24%22message%20scheduled%3A%7BscheduleSequence%7D%22%0A%0A%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%20responseModelsList.Add(responseModel)%3B%0A%0A%20%20%20%20%20%20%20%20%20%7D).ToList()%3B%0A%0A%20%20%20%20%20%20await%20Task.WhenAll(scheduledTasksList)%3B%0A%0A%20%20%20%20%7D%0A%20%20%20%20catch%20(ServiceBusException%20ex)%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20var%20responseModel%20%3D%20new%20ResponseModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20400%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20ex.Message%0A%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20responseModelsList.Add(responseModel)%3B%0A%0A%20%20%20%20%7D%0A%20%20%20%20finally%0A%20%20%20%20%7B%0A%20%20%20%20%20%20await%20serviceBusSender.DisposeAsync()%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20responseModelsList%3B%0A%0A%7D%3C%2FRESPONSEMODEL%3E%3C%2FSTRING%3E%3C%2FMESSAGEMODEL%3E%3C%2FRESPONSEMODEL%3E%3C%2FLIST%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId--469284589%22%20id%3D%22toc-hId--447179577%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EHow%20to%20Receive%20Messages%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-2147310963%22%20id%3D%22toc-hId--2125551321%22%3E%3CSPAN%20class%3D%22md-plain%22%3EReadFromDeadLetterQueue%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Epublic%20async%20Task%3CIACTIONRESULT%3E%20ReadFromDeadLetterQueue%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(string%20queueNameString%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFromHeader%5D%20HeaderModel%20headerModel)%0A%7B%0A%0A%20%20%20%20kServiceBusClient%20%3D%20new%20ServiceBusClient(headerModel.ConnectionString)%3B%0A%20%20%20%20var%20deadLetterReceiver%20%3D%20kServiceBusClient.CreateReceiver(queueNameString%2C%0A%20%20new%20ServiceBusReceiverOptions()%0A%20%20%7B%0A%0A%20%20%20%20SubQueue%20%3D%20SubQueue.DeadLetter%2C%0A%20%20%20%20%20%20%20%20ReceiveMode%20%3D%20ServiceBusReceiveMode.ReceiveAndDelete%0A%0A%20%20%20%20%7D)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20MessageModel%20receivedModel%20%3D%20null%3B%0A%20%20%20%20ErrorModel%20errorModel%20%3D%20null%3B%0A%0A%20%20%20%20try%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20var%20receivedMessage%20%3D%20await%20deadLetterReceiver.ReceiveMessageAsync(kWaitTimeSpan)%3B%0A%20%20%20%20%20%20if%20(receivedMessage%20%3D%3D%20null)%0A%20%20%20%20%20%20%20%20throw%20new%20ArgumentNullException(nameof(receivedMessage))%3B%0A%0A%20%20%20%20%20%20receivedModel%20%3D%20JsonConvert.DeserializeObject%3CMESSAGEMODEL%3E%0A%20%20%20%20%20%20%20%20(Encoding.UTF8.GetString(receivedMessage.Body))%3B%0A%20%20%20%20%20%20if%20(receivedModel%20%3D%3D%20null)%0A%20%20%20%20%20%20%20%20throw%20new%20ArgumentNullException(nameof(receivedModel))%3B%0A%0A%20%20%20%20%7D%0A%20%20%20%20catch%20(ArgumentNullException%20ex)%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20errorModel%20%3D%20new%20ErrorModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20500%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20ex.Message%0A%0A%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%7D%0A%20%20%20%20catch%20(ServiceBusException%20ex)%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20errorModel%20%3D%20new%20ErrorModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20500%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20ex.Message%0A%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20finally%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20await%20deadLetterReceiver.DisposeAsync()%3B%0A%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20Ok((receivedModel%20!%3D%20null)%20%3F%20receivedModel%20%3A%20errorModel)%3B%0A%0A%7D%3C%2FMESSAGEMODEL%3E%3C%2FIACTIONRESULT%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId-1038018441%22%20id%3D%22toc-hId-1060123453%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EService%20Bus%20Listener%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3E%2F%2F%20Service%20Bus%20SDK%20client%0Aprivate%20ServiceBusClient%20_serviceBusClient%3B%0A%0A%2F%2F%20Message%20processor%20for%20Service%20Bus%0Aprivate%20ServiceBusProcessorOptions%20_serviceBusProcessorOptions%3B%0Aprivate%20ServiceBusProcessor%20_serviceBusProcessor%3B%0A%0A%2F%2F%20Session%20based%20Message%20processor%20for%20Service%20Bus%0Aprivate%20ServiceBusSessionProcessorOptions%20_serviceBusSessionProcessorOptions%3B%0Aprivate%20ServiceBusSessionProcessor%20_serviceBusSessionProcessor%3B%0A%0A....%0Apublic%20MessageProcessor(string%20connectionString)%0A%7B%0A%0A%20%20_connectionString%20%3D%20connectionString%3B%0A%20%20_serviceBusClient%20%3D%20new%20ServiceBusClient(connectionString)%3B%0A%0A%7D%0A%0A.....%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Epublic%20async%20Task%20StartProcessingAsync(MessageProcessorCallback%20messageProcessorCallback)%0A%7B%0A%0A%20%20_serviceBusProcessor.ProcessMessageAsync%20%2B%3D%20(ProcessMessageEventArgs%20processMessageEventArgs)%20%3D%26gt%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%7B%0A%0A%20%20%20%20messageProcessorCallback.Invoke(processMessageEventArgs%2C%20null)%3B%0A%20%20%20%20return%20Task.CompletedTask%3B%0A%0A%20%20%7D%3B%0A%0A%20%20_serviceBusProcessor.ProcessErrorAsync%20%2B%3D%20(ProcessErrorEventArgs%20processErrorEventArgs)%20%3D%26gt%3B%0A%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20messageProcessorCallback.Invoke(null%2C%20processErrorEventArgs)%3B%0A%20%20%20%20return%20Task.CompletedTask%3B%0A%0A%20%20%7D%3B%0A%0A%20%20await%20_serviceBusProcessor.StartProcessingAsync()%3B%0A%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--769436022%22%20id%3D%22toc-hId--747331010%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EStart%20Message%20Processing%20for%20a%20Session%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Epublic%20async%20Task%20StartSessionProcessingAsync%20(MessageSessionProcessorCallback%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20messageSessionProcessorCallback)%0A%7B%0A%0A%20%20%20%20_serviceBusSessionProcessor.ProcessMessageAsync%20%2B%3D%0A%20%20%20%20(ProcessSessionMessageEventArgs%20processSessionMessageEventArgs)%20%3D%26gt%3B%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20messageSessionProcessorCallback.Invoke(processSessionMessageEventArgs%2C%20null)%3B%0A%20%20%20%20%20%20return%20Task.CompletedTask%3B%0A%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20_serviceBusSessionProcessor.ProcessErrorAsync%20%2B%3D%0A%20%20%20%20(ProcessErrorEventArgs%20processErrorEventArgs)%20%3D%26gt%3B%0A%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20messageSessionProcessorCallback.Invoke(null%2C%20processErrorEventArgs)%3B%0A%20%20%20%20%20%20return%20Task.CompletedTask%3B%0A%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20await%20_serviceBusSessionProcessor.StartProcessingAsync()%3B%0A%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-1588994092%22%20id%3D%22toc-hId-1611099104%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EHow%20to%20perform%20Transaction%20processing%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CH4%20class%3D%22md-end-block%20md-heading%20md-focus%22%20id%3D%22toc-hId--89377652%22%20id%3D%22toc-hId--67272640%22%3E%3CSPAN%20class%3D%22md-plain%22%3EForwardTopicAsync%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Epublic%20async%20Task%3CIACTIONRESULT%3E%20ForwardToTopicAsync%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(string%20topicNameString%2C%20string%20subscriptionNameString%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFromHeader%5D%20ForwardHeaderModel%20forwardHeaderModel%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5BFromQuery%5D%20Dictionary%3CSTRING%3E%20queryStringMap)%0A%7B%0A%0A%20%20%20%20var%20serviceBusClientOptions%20%3D%20new%20ServiceBusClientOptions()%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20EnableCrossEntityTransactions%20%3D%20true%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20TransportType%20%3D%20ServiceBusTransportType.AmqpTcp%0A%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20kServiceBusClient%20%3D%20new%20ServiceBusClient(forwardHeaderModel.ConnectionString%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20serviceBusClientOptions)%3B%0A%20%20%20%20var%20serviceBusReceiverOptions%20%3D%20new%20ServiceBusReceiverOptions()%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20PrefetchCount%20%3D%202%2C%0A%20%20%20%20%20%20ReceiveMode%20%3D%20ServiceBusReceiveMode.PeekLock%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20ServiceBusReceiver%20serviceBusReceiver%20%3D%20null%3B%0A%20%20%20%20ServiceBusSender%20nextHopSender%20%3D%20null%3B%0A%20%20%20%20OCRModel%20receivedModel%20%3D%20null%3B%0A%20%20%20%20ErrorModel%20errorModel%20%3D%20null%3B%0A%0A%20%20%20%20try%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20var%20sessionNameString%20%3D%20queryStringMap%5B%22session%22%5D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20var%20nextHopTopicNameString%20%3D%20forwardHeaderModel.NextHopTopicName%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20var%20nextHopSessionNameString%20%3D%20forwardHeaderModel.NextHopSessionName%3B%0A%0A%20%20%20%20%20%20serviceBusReceiver%20%3D%20kServiceBusClient.CreateReceiver%0A%20%20%20%20%20%20%20%20(topicNameString%2C%20subscriptionNameString%2C%0A%20%20%20%20%20%20%20%20%20serviceBusReceiverOptions)%3B%0A%20%20%20%20%20%20nextHopSender%20%3D%20kServiceBusClient.CreateSender(nextHopTopicNameString)%3B%0A%0A%20%20%20%20%20%20var%20receivedMessage%20%3D%20await%20serviceBusReceiver%3F.ReceiveMessageAsync(kWaitTimeSpan)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20if%20(receivedMessage%20%3D%3D%20null)%0A%20%20%20%20%20%20%20%20throw%20new%20ArgumentNullException(nameof(receivedMessage))%3B%0A%0A%20%20%20%20%20%20receivedModel%20%3D%20JsonConvert.DeserializeObject%3COCRMODEL%3E%0A%20%20%20%20%20%20%20%20(Encoding.UTF8.GetString(receivedMessage.Body))%3B%0A%20%20%20%20%20%20if%20(receivedModel%20%3D%3D%20null)%0A%20%20%20%20%20%20%20%20throw%20new%20ArgumentNullException(nameof(receivedModel))%3B%0A%0A%20%20%20%20%20%20using%20(var%20ts%20%3D%20new%20TransactionScope(TransactionScopeAsyncFlowOption.Enabled))%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20await%20serviceBusReceiver.CompleteMessageAsync(receivedMessage)%3B%0A%0A%20%20%20%20%20%20%20%20var%20serviceBusMessage%20%3D%20new%20ServiceBusMessage(receivedMessage)%3B%0A%20%20%20%20%20%20%20%20serviceBusMessage.TransactionPartitionKey%20%3D%20receivedMessage.PartitionKey%3B%0A%20%20%20%20%20%20%20%20serviceBusMessage.SessionId%20%3D%20nextHopSessionNameString%3B%0A%0A%20%20%20%20%20%20%20%20await%20nextHopSender.SendMessageAsync(serviceBusMessage)%3B%0A%20%20%20%20%20%20%20%20ts.Complete()%3B%0A%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20catch%20(ArgumentNullException%20ex)%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20errorModel%20%3D%20new%20ErrorModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20400%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20ex.Message%0A%0A%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%7D%0A%20%20%20%20catch%20(ServiceBusException%20ex)%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20errorModel%20%3D%20new%20ErrorModel()%0A%20%20%20%20%20%20%7B%0A%0A%20%20%20%20%20%20%20%20Code%20%3D%20500%2C%0A%20%20%20%20%20%20%20%20Message%20%3D%20ex.Message%0A%0A%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%7D%0A%20%20%20%20finally%0A%20%20%20%20%7B%0A%0A%20%20%20%20%20%20if%20(serviceBusReceiver%20!%3D%20null)%0A%20%20%20%20%20%20%20%20await%20serviceBusReceiver.DisposeAsync()%3B%0A%0A%20%20%20%20%20%20if%20(nextHopSender%20!%3D%20null)%0A%20%20%20%20%20%20%20%20await%20nextHopSender.DisposeAsync()%3B%0A%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20Ok((receivedModel%20!%3D%20null)%20%3F%20receivedModel%20%3A%20errorModel)%3B%0A%0A%7D%3C%2FOCRMODEL%3E%3C%2FSTRING%3E%3C%2FIACTIONRESULT%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20class%3D%22md-end-block%20md-heading%22%20id%3D%22toc-hId-2139969743%22%20id%3D%22toc-hId--2132892541%22%3E%3CSPAN%20class%3D%22md-plain%20md-expand%22%3EReferences%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CUL%20class%3D%22ul-list%22%20data-mark%3D%22-%22%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fservice-bus-messaging-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EService%20Bus%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fservice-bus-queues-topics-subscriptions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EQueues%2C%20Topics%20and%20Subscriptions%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%22%3E%3CP%20class%3D%22md-end-block%20md-p%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-bus-messaging%2Fadvanced-features-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3EAdvanced%20Features%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%20class%3D%22md-list-item%20md-focus-container%22%3E%3CP%20class%3D%22md-end-block%20md-p%20md-focus%22%3E%3CSPAN%20class%3D%22md-meta-i-c%20%20md-link%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsecurity%2Fbenchmark%2Fazure%2Fbaselines%2Fservice-bus-messaging-security-baseline%3Ftoc%3D%2Fazure%2Fservice-bus-messaging%2FTOC.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22md-plain%22%3ESecurity%20baseline%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-3275225%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22about-service-bus-queue.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362616i3471DD21C0D92E48%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22about-service-bus-queue.png%22%20alt%3D%22about-service-bus-queue.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22about-service-bus-topic.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362615i7E3F16900277D534%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22about-service-bus-topic.png%22%20alt%3D%22about-service-bus-topic.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBuild%20a%20Robust%20Messaging%20Infrastructure%20using%20Azure%20Service%20Bus%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3275225%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E.%20NET%20Core%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicroservices%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EServerless%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Apr 10 2022 01:13 AM
Updated by: