Microsoft.Orleans.Streaming.EventHubs
10.2.1
Prefix Reserved
dotnet add package Microsoft.Orleans.Streaming.EventHubs --version 10.2.1
NuGet\Install-Package Microsoft.Orleans.Streaming.EventHubs -Version 10.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Orleans.Streaming.EventHubs" Version="10.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Orleans.Streaming.EventHubs" Version="10.2.1" />Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Streaming.EventHubs" />Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Orleans.Streaming.EventHubs --version 10.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Microsoft.Orleans.Streaming.EventHubs, 10.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Orleans.Streaming.EventHubs@10.2.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Orleans.Streaming.EventHubs&version=10.2.1Install as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Streaming.EventHubs&version=10.2.1Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Microsoft Orleans Stream Provider for Azure Event Hubs
Introduction
Microsoft Orleans Stream Provider for Azure Event Hubs enables Orleans applications to leverage Azure Event Hubs for reliable, scalable event processing. This provider allows you to use Event Hubs as a streaming backbone for your Orleans application to both produce and consume streams of events.
Getting Started
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Streaming.EventHubs
Example - Configuring Event Hubs Stream Provider
using Microsoft.Extensions.Hosting;
using Orleans.Configuration;
using Orleans.Hosting;
namespace ExampleGrains;
var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure Azure Event Hubs as a stream provider
.AddEventHubStreams(
"EventHubStreamProvider",
configurator =>
{
configurator.ConfigureEventHub(builder => builder.Configure(options =>
{
options.ConnectionString = "YOUR_EVENT_HUB_CONNECTION_STRING";
options.ConsumerGroup = "YOUR_CONSUMER_GROUP"; // Default is "$Default"
options.Path = "YOUR_EVENT_HUB_NAME";
}));
configurator.UseAzureTableCheckpointer(builder => builder.Configure(options =>
{
options.ConnectionString = "YOUR_STORAGE_CONNECTION_STRING";
options.TableName = "EventHubCheckpoints"; // Optional
}));
});
});
// Run the host
await builder.RunAsync();
Example - Using Event Hub Streams in a Grain
// Grain interface
public interface IStreamProcessingGrain : IGrainWithGuidKey
{
Task StartProcessing();
}
// Grain implementation
public class StreamProcessingGrain : Grain, IStreamProcessingGrain
{
private IStreamProvider _streamProvider;
private IAsyncStream<MyEvent> _stream;
private StreamSubscriptionHandle<MyEvent> _subscription;
public override async Task OnActivateAsync(CancellationToken cancellationToken)
{
// Get the stream provider
_streamProvider = GetStreamProvider("EventHubStreamProvider");
// Get a reference to a specific stream
_stream = _streamProvider.GetStream<MyEvent>(this.GetPrimaryKey(), "MyStreamNamespace");
await base.OnActivateAsync(cancellationToken);
}
public async Task StartProcessing()
{
// Subscribe to the stream to process events
_subscription = await _stream.SubscribeAsync(OnNextAsync);
}
private Task OnNextAsync(MyEvent evt, StreamSequenceToken token)
{
Console.WriteLine($"Received event: {evt.Data}");
return Task.CompletedTask;
}
// Produce an event to the stream
public Task SendEvent(MyEvent evt)
{
return _stream.OnNextAsync(evt);
}
}
// Event class
public class MyEvent
{
public string Data { get; set; }
}
Documentation
For more comprehensive documentation, please refer to:
Feedback & Contributing
- If you have any issues or would like to provide feedback, please open an issue on GitHub
- Join our community on Discord
- Follow the @msftorleans Twitter account for Orleans announcements
- Contributions are welcome! Please review our contribution guidelines
- This project is licensed under the MIT license
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Azure.Core (>= 1.51.1)
- Azure.Data.Tables (>= 12.11.0)
- Azure.Messaging.EventHubs (>= 5.12.2)
- Microsoft.AspNetCore.Connections.Abstractions (>= 10.0.3)
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.CodeAnalysis.Common (>= 5.0.0)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 5.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.5)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
- Microsoft.Extensions.Configuration.Json (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.DependencyModel (>= 10.0.5)
- Microsoft.Extensions.Hosting (>= 10.0.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Console (>= 10.0.5)
- Microsoft.Extensions.Logging.Debug (>= 10.0.5)
- Microsoft.Extensions.ObjectPool (>= 10.0.5)
- Microsoft.Extensions.Options (>= 10.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.5)
- Microsoft.Orleans.Analyzers (>= 10.2.1)
- Microsoft.Orleans.CodeGenerator (>= 10.2.1)
- Microsoft.Orleans.Streaming (>= 10.2.1)
- Newtonsoft.Json (>= 13.0.4)
- System.IO.Hashing (>= 10.0.3)
- System.Memory.Data (>= 10.0.3)
-
net8.0
- Azure.Core (>= 1.50.0)
- Azure.Data.Tables (>= 12.11.0)
- Azure.Messaging.EventHubs (>= 5.12.2)
- Microsoft.AspNetCore.Connections.Abstractions (>= 8.0.24)
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.CodeAnalysis.Common (>= 4.5.0)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 4.5.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.DependencyModel (>= 8.0.2)
- Microsoft.Extensions.Hosting (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.Logging.Console (>= 8.0.1)
- Microsoft.Extensions.Logging.Debug (>= 8.0.1)
- Microsoft.Extensions.ObjectPool (>= 8.0.24)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Orleans.Analyzers (>= 10.2.1)
- Microsoft.Orleans.CodeGenerator (>= 10.2.1)
- Microsoft.Orleans.Streaming (>= 10.2.1)
- Newtonsoft.Json (>= 13.0.4)
- System.IO.Hashing (>= 10.0.3)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory.Data (>= 8.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Microsoft.Orleans.Streaming.EventHubs:
| Package | Downloads |
|---|---|
|
Microsoft.AutoGen.RuntimeGateway.Grpc
A programming framework for agentic AI |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Microsoft.Orleans.Streaming.EventHubs:
| Repository | Stars |
|---|---|
|
dotnet/samples
Sample code referenced by the .NET documentation
|
|
|
J-Tech-Japan/Sekiban
Sekiban - an Opinionated Event Sourcing and CQRS Framework using C#. It can store data into Azure Cosmos DB, AWS Dynamo DB or Postgres
|
|
|
microsoft/project-oagents
Experimental AI Agents Framework
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.2.1 | 1,552 | 6/24/2026 |
| 10.2.1-preview.1 | 50 | 6/19/2026 |
| 10.2.0 | 937 | 6/12/2026 |
| 10.1.1-preview.1 | 60 | 5/13/2026 |
| 10.1.0 | 14,382 | 4/14/2026 |
| 10.0.1 | 31,808 | 2/7/2026 |
| 10.0.0 | 5,138 | 1/20/2026 |
| 10.0.0-rc.2 | 164 | 12/31/2025 |
| 9.2.1 | 80,154 | 7/16/2025 |
| 9.2.0 | 1,150 | 7/14/2025 |
| 9.2.0-preview3 | 528 | 6/10/2025 |
| 9.2.0-preview2 | 214 | 6/4/2025 |
| 9.2.0-preview1 | 5,424 | 4/4/2025 |
| 9.1.2 | 75,368 | 2/13/2025 |
| 9.0.1 | 52,318 | 11/23/2024 |
| 9.0.0 | 1,281 | 11/14/2024 |
| 8.2.0 | 71,170 | 7/12/2024 |
| 7.2.7 | 1,127 | 10/15/2024 |
Loading failed