Reader small image

You're reading from  Hands-On Azure for Developers

Product typeBook
Published inNov 2018
PublisherPackt
ISBN-139781789340624
Edition1st Edition
Tools
Right arrow
Author (1)
Kamil Mrzygłód
Kamil Mrzygłód
author image
Kamil Mrzygłód

Kamil Mrzygłód is a technical lead and technology advisor, working with multiple companies on designing and implementing Azure-based systems and platforms. He's a former Microsoft Azure Microsoft Most Valuable Professional (MVP) and certified trainer, who shares his knowledge via various channels, including conference speeches and open source projects and contributions. Kamil lives in Poland with his two cats and one dog, dedicating some of his time to video games, cooking, and traveling.
Read more about Kamil Mrzygłód

Right arrow

Enterprise Integration - Azure Service Bus

Sometimes, to integrate our applications using messaging solutions, we need something more than a simple pipeline, which offers limited capabilities when it comes to distributing data and filtering it. Topics, filters, and many more features are available in Azure Service Bus, an enterprise-level solution designed for providing a reliable, scalable, and efficient way for sending messages to multiple receivers.

The following topics will be covered in this chapter:

  • Working with Azure Service Bus
  • The fundamentals—queues, topics, and relays
  • Securing Azure Service Bus
  • The advanced features like geo-replication, sessions, or dead lettering
  • Handling outages and disasters

Technical requirements

To perform the exercises in this chapter, you will need:

  • Access to a Microsoft Azure subscription
  • A Visual Studio 2017 instance
  • Visual Studio Code (if you don't have a Visual Studio 2017 instance)

Azure Service Bus fundamentals

You have already learned about other messaging solutions, which allow you to ease communication between your services, and all are characterized by different features. In Azure Event Hub, you were able to process thousands of messages per second, while with Azure Storage Queues you were given a reliable and durable solution, which you could use to work asynchronously on ingested data. In this chapter, we will discuss Azure Service Bus, a multitenant cloud messaging service that introduces advanced concepts like first-in,first-out(FIFO) messaging, dead lettering, or transactions. It is an enterprise-class cloud component able to integrate many different services and applications.

Azure Service Bus versus other messaging services

...

Azure Service Bus security

As Azure Service Bus is described as an enterprise-level cloud service designed for integrating different services, there are serious expectations regarding the security features it offers. Besides shared access tokens, there are new features in the preview, which allow much more flexible access management.

Managed Service Identity

Managed Service Identity (MSI) is a feature in Azure Cloud, which eases authentication between services, without storing credentials in your code. The whole description can be found in the link in the Further reading section. When it comes to using it with Azure Service Bus, there is no additional blade available—what you need is just to find an identity in the...

Advanced features of Azure Service Bus

We have already covered some of the basics of the Azure Service Bus, like SDK, the most crucial concepts, and security considerations. Now we will focus a little bit on more advanced use cases, like dead lettering, performance, sessions, and transactions. All those topics are crucial when developing a reliable and important service integrating many different applications and systems. Also remember to take a look at the Azure Service Bus examples in the Further reading section, as it points to a GitHub repository where you can find many different use cases and concepts when using this service.

Dead lettering

In general, dead lettering means that there are messages in a queue considered...

Handling outages and disasters

If you make Azure Service Bus the center of your architecture—a service that is responsible for integrating dozens of services and handling the communication—you have to make sure that it is replicated and invulnerable to disasters. There are two topics to consider here: disaster recovery and handling outages. As those terms are completely different concepts, you have both to understand them and be able to implement a solution in case unexpected issues and accidents occur. In the last section of this chapter, you will learn how Azure Service Bus can be made into a durable cloud component, on which you and your applications can rely.

Disaster recovery

When a disaster happens, you...

Summary

In this short chapter, you learned the basic concepts of Azure Service Bus including queues, topics, SDK, and more advanced features like dead lettering, sessions, and transactions. There are still many things to learn: asynchronous messaging, Advanced Message Queuing Protocol (AMQP), and advanced transaction scenarios. In general, it is a great service for both simple and critical scenarios as it gives you enough flexibility to adjust it to most applications, and at the same time it is quite easy to learn how to get started. Remember, you can use the basic tier for the simplest use cases, which gives you a cheap and reliable solution, a much richer option than Azure Storage Queue. In the next chapter, we will focus on monitoring services with Azure Application Insights.

Questions

  1. What is the difference between a queue and a topic?
  2. Can you use topics in the basic tier?
  3. What is the reason for using a dead letter queue?
  4. What are sessions for in Azure Service Bus?
  5. What is the maximum size of a queue with partitioning enabled, when a single queue has the maximum size of 1 GB?
  6. What is the difference between active and passive replication?
  7. How is disaster recovery achieved in Azure Service Bus?

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Azure for Developers
Published in: Nov 2018Publisher: PacktISBN-13: 9781789340624
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Kamil Mrzygłód

Kamil Mrzygłód is a technical lead and technology advisor, working with multiple companies on designing and implementing Azure-based systems and platforms. He's a former Microsoft Azure Microsoft Most Valuable Professional (MVP) and certified trainer, who shares his knowledge via various channels, including conference speeches and open source projects and contributions. Kamil lives in Poland with his two cats and one dog, dedicating some of his time to video games, cooking, and traveling.
Read more about Kamil Mrzygłód