Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should we use the Microsoft.Azure.EventHubs.Processor library with .NET framework

Context

We're currently using Microsoft.Azure.ServiceBus.EventProcessorHost for data ingestion from an Azure Event-Hub. We run on .NET framework, not .NET Core.

This Microsoft announcement (published Feb 2, 2017) suggests the newer Microsoft.Azure.EventHubs.Processor is the way to go in the future, regardless of the .NET runtime you use, as they will maintain a single code base.

Meanwhile, the official Microsoft Event-Hub samples updated recently still suggest the older library (Microsoft.Azure.ServiceBus.EventProcessorHost) for the .NET framework.

Both libraries have been updated and evolved since the announcement.

Question

Since we're on .NET framework, which library should we use going forward?

Should we migrate to the newer Microsoft.Azure.EventHubs.Processor, in order to benefit from the latest development, improvements and bug fixes? Or is the old one kept up to speed?

The question is relevant to newcomers as well, which library should they pick to get started with Azure Event-Hubs.

like image 656
Francis MC Avatar asked Oct 17 '22 21:10

Francis MC


1 Answers

I may be partial in my answer, but I would prefer the newer Microsoft.Azure.EventHubs library. This is for the following reasons:

  • It is open source. You can see the roadmap, current issues, file your own issues, and in case you need it, you have access to the code with an MIT license.
  • It uses .NET Standard. In case your solution ever changes to .NET Core, or any of the other .NET runtimes, you can continue to use your Event Hubs code.
  • This is the library that Microsoft will be emphasizing in the future. While that is my assumption, here's why I think that:
    • The learn.microsoft.com getting started examples use the new library. https://learn.microsoft.com/azure/event-hubs/event-hubs-dotnet-standard-getstarted-send
    • Microsoft has seen the benefits of open source development, and nearly all of their Azure libraries are being open sourced. i.e. Service Fabric just went open source as well: https://blogs.msdn.microsoft.com/azureservicefabric/2018/03/14/service-fabric-is-going-open-source/
    • The newer library was createdd with the intent to replace the older library. While Microsoft is very good at supporting old / legagcy libraries, the ultimate intent was to replace the older library. https://azure.microsoft.com/blog/event-hubs-dotnet-standard-client-reaches-ga/
like image 63
JTaub Avatar answered Nov 03 '22 00:11

JTaub