Book Image

Learning Microsoft Azure

By : Geoff Webber Cross, Geoff Webber-Cross
Book Image

Learning Microsoft Azure

By: Geoff Webber Cross, Geoff Webber-Cross

Overview of this book

Table of Contents (19 chapters)
Learning Microsoft Azure
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Dead-letter queues


Under various failure conditions, messages can be automatically sent to a topic's dead-letter queue (the same applies to Service Bus queues). We can configure topics and subscriptions to dead-letter messages if their Time to live (TTL) expires, if they don't have a matching subscription filter, or if they cannot be delivered.

We need to pay attention to the dead-letter queue as it consumes our storage allocation for the topic, but it can also allow us to administer undelivered messages and diagnose potential performance issues or application problems.

Each subscription has its own dead-letter queue that can be accessed using the TopicClient object with /$DeadLetterQueue appended to various failure conditions; messages can be automatically sent to a the subscription name, like this:

// Create subscription client 
var subscriptionClient = SubscriptionClient.Create("TopicName", "SubscriptionName");

// Create dead letter client using subscription client TopicPath
var deadLetterClient...