Azure Event Grid, Event Hubs, and Service Bus Library Improvements

Azure Event Grid, Event Hubs, and Service Bus Library Improvements

In this tutorial, Azure Event Grid, Event Hub, and Service Bus Library Improvements

Why new client libraries?

The new client libraries for messaging services are part of a larger set of new client libraries that we have been releasing for different Azure services since November 2019. We have shared the motivation behind the creation of these new libraries in the following blog posts: Previewing Azure SDKs following new Azure SDK API Standards, and State of the Azure SDK 2021.

Messaging services on Azure

Although Azure Event Hubs, Azure Service Bus, and Azure Event Grid share some similarities, they are designed for different scenarios. For a detailed comparison of the services, we recommend checking out these articles in the documentation for Azure services:

Azure Event Hubs SDK Highlights

Simpler clients, consistent experience

Clients are usually the entry point into a library. This means before users can invoke a method, they have to create an instance of a client first. We have redesigned the client hierarchy of the new libraries to be simpler and more approachable for developers. The new libraries use the same client for all publishing scenarios, with a set of options controlling specific behaviors rather than having different clients for each scenario. This design, along with having similar names, signatures, and location for the methods provide a consistent experience for publishing. Please see our Migration Guides for a more detailed comparison of the client hierarchy in the latest library and that of the previous library.

Easily create optimally sized batches

Publishing in batches gives better efficiency and throughput. While this feature was available before, it is more sophisticated in the new libraries. Users no longer have to wait for the send method to fail to realize that a batch has exceeded its size limit. Instead, when they add events into a batch, they are notified if the addition of a particular event causes the batch to exceed its size limit. This eliminates the need for trial-and-error when trying to send batches optimally.

Easily customize durable store for checkpoints

We redesigned the way checkpoint store support is implemented in the new libraries to make it easier for users to swap out Azure Blob Storage with a durable store of their choice for storing checkpoints.

Language-specific Highlights

The new Java library provides Reactor support, just like all the other new Java libraries for Azure services.

For receiving events, the new Java and .NET libraries provide two clients, the consumer client and the processor client for different application needs. The consumer client allows users to receive from a single partition and gives them a higher degree of control but at the cost of additional complexity around partition management. The processor client provides a more approachable onboarding experience for new users by eliminating the need to manage partitions. It also offers a clear step-up path to production where load-balancing across partitions would become necessary. Learn more about the processor client in the following blog posts:

A commonly reported issue for the old JavaScript library was the inability to control the pace at which events are received, which could result in flooding of downstream dependencies and confusions about which events have been consumed and in what order. The new JavaScript library fixed this issue so that users get a new event only after they finish processing the current one.

The new JavaScript and Python libraries consolidated multiple ways of receiving events into a single method that works for receiving from one partition as well as all partitions, and with or without checkpointing. These libraries also allow configuration of retry policy used by operations on the clients, which was a feature not available before.

azure sdk eventgrid eventhubs

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Azure SDK for Java Logging in Azure Functions | Azure SDK Blog

In this post we will learn about Azure SDK for Java application and HTTP logging scenarios in an Azure Functions environment. We will look at the scenario of managing secrets in the Azure Key Vault with the Key Vault and Identity client libraries and how to activate and access the SDK logs in the Azure Functions environment.

Download Android SDK Manager and SDK Tools

We’ll read about the Android SDK Manager. We will see what is SDK manager in Android and why and how it is important for Android

Azure SDK: What's new in the Azure Identity August 2020 General Availability Release

Since we shipped the first Azure Identity library preview in June 2019, it has been a vital part of building Azure cloud solutions. We have received great feedback from our development community and have added new features and have fixed many bugs.

How to Use Azure Go SDK to Manage Azure Data Explorer Clusters

In this article, see how to programmatically manage Azure Data Explorer resources using Go.Getting started with Azure Data Explorer using the Go SDK covered how to use the Azure Data Explorer Go SDK to ingest and query data from azure data explorer to ingest and query data. In this blog you will the Azure Go SDK to manage Azure Data Explorer clusters and databases.

Add search to an application with the new Azure Cognitive Search SDK

This blog post will walk you through the process of building and deploying a simple search application with Azure Cognitive Search and the new Azure SDK for Javascript/Typescript. We’ll first create an Azure Function to encapsulate the search client and query logic.