Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By : Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper
Book Image

SOA Patterns with BizTalk Server 2013 and Microsoft Azure

By: Richard Seroter, Mark T Brimble, Coen J Dijkgraaf, Mahindra Morar, Mark Brimble, Colin Dijkgraaf, Johann Cooper

Overview of this book

Table of Contents (21 chapters)
SOA Patterns with BizTalk Server 2013 and Microsoft Azure Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Retrieving messages off a Queue


Reading a message off the queue may be requested using one of two modes. PeekLock, which is the default mode, reads the message of the queue and places a lock on the read message. This makes the message invisible to other consumers of the Queue. The message will reappear on the Queue if the consumer does not issue a Complete command within the specified VisibilityTimeout period. The message can also reappear if the consumer calls the Abandon method. This type of processing is ideal for when guaranteed processing of a message is mandatory.

The second option is ReceiveAndDelete mode. This is when, once the message is read, it will immediately be deleted from the Queue. This ensures that the message will get processed once only and is processed in FIFO order. However, there is a risk of the message getting lost if the process that consumed the message hangs.

To ensure your message is idempotent, there are several strategies that may be adopted:

  • Setting the VisibilityTimeout...