Present and Future of Azure Messaging | Serverless360
← Return To Home

Present and Future of Azure Messaging & What’s new with Azure Event Grid

This blog is an extraction of the session “Present and Future of Azure Messaging & What’s new with Azure Event Grid” in Integrate 2020 Remote event presented by Kevin Lam, Principal PM Manager at Microsoft.

It gives a detailed overview of the distinction between Azure Messaging Services like Azure Service Bus, Azure Event Hub, Azure Event Grid, and Azure Relay. This session also had a detailed update on a new set of features from Azure Event Grid.

Azure Messaging Services

Azure Services

To understand the distinction between these Azure Messaging Services, one should know the different types of messages that these Azure Messaging Services handle.

Types of Messages

Messages can either be;

  • Commands – Commands are messages which have an intent or value which is passed from one place to another. Azure Service Bus handles this type of message.
  • Facts – Facts is again categorized into two types which can be either
    1. Time Series – Time series is collection of Events. Azure Event Hub handles this type of messages.
    2. Discrete – It describes something that has happened at a particular time. Azure Event Grid handles this type of messages.

Azure Service Bus

Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state.

Azure Service Bus

Azure Event Hub

Azure Event Hub is high-scale, high-availability, multi-protocol event stream engine used for collecting and consolidating events for real-time analytics and other high-throughput computations.

Azure Event Hub

Azure Relay

Azure Relays expose (micro-) services, databases, endpoints from private networks on a public network endpoint without requiring VPN connectivity and/or DNS integration.

Azure Relay

Azure Event Grid

Azure Event Grid is the Azure-wide eventing backplane for distributing and handling discrete events raised at a platform level, by custom applications and by partner platforms.

Azure Event Grid

The important components of Azure Event Grid are;

Event Sources

Event Sources push events to the topics for broadcasting and it has no concern for the event listeners. Event source has System and Custom Topics.

  • System Event Sources includes – Blob Storage, Resource Groups, Azure Subscriptions, Event Hub, Azure Media Service, IoT Hub, Service Bus, Azure Maps, Azure Container Registry, SignalR Service, App Configuration, Azure Machine Learning, CloudEvents Sources.
  • App Services is the new addition to System Event Sources.
  • Partner Topics is the recently added Event Source – It allows 3rd party SaaS providers to behave like Azure services and publish events to Topics which anybody can listen to. It will be considered as a system topic once onboarded. The first Partner Topic onboarded was Auth0.
  • Event Handlers

    Event Handlers are sinks to the event publisher which is aware of the publisher and it is responsible for reacting to the events.

    Azure Event Handler

    Event Grid on Edge

    Event Grid on IoT Edge – It allows to have Event Grid side by side with IoT components. It is a greater way to have inter-module messaging on the IoT devices.

    As a next development on Edge, Event Grid on K8S is going to roll over. It will allow Event grid to communicate not only with the IoT devise but also with the other containerized applications that are running on the Edge as well as disconnected.

    Azure Event Grid Edge

    Event Grid Security

    New features that has been brought to the security are:

    • Publish to Azure Active Directory protected Endpoints
    • Managed Identity (preview)
    • Private Links (preview)– Private endpoints for publishers.

    What’s coming at the end of the year:

    • GA Managed Identity and Private Links
    • Bring Your Own Key – Own keys can be used for encryption
    • Double Encryption – Encrypt at rest and use your own key to encrypt again.

    Features to be expected at the end of this year in Event Grid are:

    • Dedicated Resources – It will used to improve the throughput
    • Primary Secondary Locations for Subscriptions – Allows automatic routing to secondary location
    • Http 2.0 Support
    • More Advanced Filter Operating Types
    • Event Capture to Storage
    • Logic Apps Handler

    Demo

    Kevin Lam then gave a demo comprising all the Azure Messaging Service. The demo explains how the Partner Topics connect to the Auth0 which will have subscription to the Topic and events get published to the Partner Topic then a Logic App listens to the Event Grid Topic and push those events to Service Bus and Event Hub.

    Kevin Lam started his demo by getting into Auth0 and navigating to the ‘Streams’ section in which he already had couple of Topics created. Auth0 Streams allows users to create Topics for the tenants. Among the two Topics one was named ‘Azure Event Grid Integrate’ which he used for the demo. So now all the events that happen on Auth0 will be published to this Topic.

    Auth0 Topic Creation

    As the next step, he navigated to a pre-created Logic App in Azure Portal, which had Event Grid Subscription listening to events from Auth0. He then added an action to forward the message to Event Hub when a message arrives.

    He then added an action to parse the JSON message coming from the Event Grid, to which he uploaded a sample payload.

    As a next step, he added a ‘Switch’ statement in the Logic App based on the event type that is coming into the route the messages to different Azure Service Bus Queues. The first Switch case was used to process the event that is generated when a new user signs up and before routing it to a Queue, he used ‘Compose’ action transform the message, which is understandable to any downstream application that listens to that Queue. The second Switch case was used to process the event that is generated when there are a successful email change and this time the raw message is routed to a different Queue.

    Logic App Creation

    Now as the setup was complete, he added a new user to Auth0. It successfully triggered a new user sign up event, which was parsed and forwarded to the Queue.

    New User Sign Up Successful Logic App Run

    Conclusion

    Kevin Lam concluded by showing some mind-blowing statistics on reliability, support to different regions and the monthly requests that Azure Messaging Services process.