☁️ .NET Standard client library for Azure Event Hubs
Перейти к файлу
Serkant Karaca cec369a9fa
Reduce the number of storage calls in lease manager (#357)
* Couple improvements in Azure Lease Manager to reduce numberof storage calls.

* N/A as partition id

* Go with default timeout

* Moving to most recent AMQP release

* Fix flaky EPH test

* Adding 30 seconds default operation timeout back to tests.

* Reducing EPH to storage IO calls.

* Couple more fixes

* .

* Set token for owned leases.

* Refresh lease before acquiring in processor host.

* Fix metada removal order during lease release.

* Update lease token only for already running pumps to avoid resetting receiver position data.

* FetchAttributesAsync of blob as part of GetAllLeasesAsync() call.

* Refresh lease before attempting to steal

* Don't retry if we already lost the lease during receiver open.

* Don't attempt to steal if owner has changed from the calculation time to refresh time.

* -

* Partition pump to close when hit ReceiverDisconnectedException since this is not recoverable.

* -

* Ignore any failure during releasing the lease

* Don't update pump token if token is empty

* Nullify the owner on the lease in case this host lost it.

* Increment ourLeaseCount when a lease is acquired.

* Correcting task list

* No need to assign pump lease token to downloaded lease.

* comment update

* comment update

* Clear ownership on partial acquisition.

* Clear ownership on partial acquisition.

* Make sure we don't leave the lease as owned if acquisition failed.

* Adding logs to debug lease corruption bug

* Adding logs to debug lease corruption bug

* Small fix at steal lease check

* Protect subject iterator variable during task creation in for loops.

* .

* Renew lease right after ChangeLease call

* Don't create pump if partition expired or already moved to some other host.

* Use refreshed lease while creating partition pump.

* Remove temporary debug logs.

* Addressing SJ's comments

* Remove obsolete
2019-02-11 13:34:24 -08:00
.github Adding GitHub templates (#90) 2017-01-20 08:51:18 -08:00
build Moving to SDK 2.0 (#205) 2017-09-22 14:19:27 -07:00
src Reduce the number of storage calls in lease manager (#357) 2019-02-11 13:34:24 -08:00
test/Microsoft.Azure.EventHubs.Tests Reduce the number of storage calls in lease manager (#357) 2019-02-11 13:34:24 -08:00
.editorconfig Update project to VS 2017 (#158) 2017-05-02 15:29:56 -07:00
.gitattributes Added .gitattributes, contribution guide, and license from azure-event-hubs repo 2016-10-11 15:35:17 -07:00
.gitignore Appveyor and unit test updates (#166) 2017-05-26 17:25:13 -07:00
LICENSE Update and rename license.txt to LICENSE 2016-10-31 14:52:28 -07:00
Microsoft.Azure.EventHubs.sln Appveyor and unit test updates (#166) 2017-05-26 17:25:13 -07:00
appveyor.yml Moving to SDK 2.0 (#205) 2017-09-22 14:19:27 -07:00
event-hubs.png changing the icon for nuget (#228) 2018-01-11 09:30:55 -08:00
readme.md Update readme.md 2018-03-15 14:25:29 -05:00

readme.md

Microsoft Azure Event Hubs

Microsoft Azure Event Hubs Client for .NET

Build/Package Status
master Build status codecov
dev Build status codecov
Microsoft.Azure.EventHubs NuGet Version and Downloads count
Microsoft.Azure.EventHubs.Processor NuGet Version and Downloads count

This library is built using .NET Standard 2.0. For more information on what platforms are supported see .NET Platforms Support.

Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them into multiple applications. This lets you process and analyze the massive amounts of data produced by your connected devices and applications. Once Event Hubs has collected the data, you can retrieve, transform and store it by using any real-time analytics provider or with batching/storage adapters.

Refer to the online documentation to learn more about Event Hubs in general.

How to provide feedback

See our Contribution Guidelines.

Overview

The .NET client library for Azure Event Hubs allows for both sending events to and receiving events from an Azure Event Hub.

An event publisher is a source of telemetry data, diagnostics information, usage logs, or other log data, as part of an embedded device solution, a mobile device application, a game title running on a console or other device, some client or server based business solution, or a web site.

An event consumer picks up such information from the Event Hub and processes it. Processing may involve aggregation, complex computation and filtering. Processing may also involve distribution or storage of the information in a raw or transformed fashion. Event Hub consumers are often robust and high-scale platform infrastructure parts with built-in analytics capabilites, like Azure Stream Analytics, Apache Spark, or Apache Storm.

Most applications will act either as an event publisher or an event consumer, but rarely both. The exception are event consumers that filter and/or transform event streams and then forward them on to another Event Hub; an example for such is Azure Stream Analytics.

FAQ

Where can I find examples that use this library?

https://github.com/Azure/azure-event-hubs/tree/master/samples

How to build client libraries on Visual Studio 2017?

Make sure you have .NET Core Cross-Platform Development SDK installed. If it is missing, you can install the SDK by running Visual Studio Installer. See https://www.microsoft.com/net/core#windowscmd for VS 2017 and SDK installation.

How do I run the unit tests?

In order to run the unit tests, you will need to do the following:

  1. Deploy the Azure Resource Manager template located at /build/azuredeploy.json by clicking the following button:

    Running the above template will provision an Event Hubs namespace along with the required entities to successfully run the unit tests.

  2. Add an Environment Variable named azure-event-hubs-dotnet/connectionstring and set the value as the connection string of the newly created namespace. Please note that if you are using Visual Studio, you must restart Visual Studio in order to use new Environment Variables.

  3. Add an Environment Variable named azure-event-hubs-dotnet/storageconnectionstring and set the value as the connection string of the newly created storage account.

Once you have completed the above, you can run dotnet test from the /test/Microsoft.Azure.EventHubs.Tests directory.

Can I manage Event Hubs entities with this library?

The standard way to manage Azure resources is by using Azure Resource Manager. In order to use functionality that previously existed in the .NET Framework Service Bus client library, you will need to use the Microsoft.Azure.Management.EventHub library. This will enable use cases that dynamically create/read/update/delete resources. The following links will provide more information on the new library and how to use it.