Skip to content

Orleans stream providers

A stream provider connects the Orleans streaming API to a transport and defines its runtime semantics. Select a provider from required durability, replay, throughput, hosting environment, and operational ownership. Provider behavior still depends on backing-service configuration such as retention, replication, and visibility timeouts.

ProviderPackageStatusExternal event durabilityRewindableExternal prerequisites
MemoryMicrosoft.Orleans.StreamingStableNo; silo memory onlyYes, within the transient in-memory cacheNone
Azure Queue StorageMicrosoft.Orleans.Streaming.AzureStorageStableYes, in Azure Storage queuesNoAzure Storage account or Azurite; credentials and a stable Orleans service ID
Azure Event HubsMicrosoft.Orleans.Streaming.EventHubsStableYes, within Event Hubs retentionYesEvent Hubs namespace, hub, consumer group, and checkpoint storage
Amazon KinesisMicrosoft.Orleans.Streaming.KinesisStableYes, within Kinesis retentionYesKinesis data stream, AWS credentials, region, and durable checkpoint storage
Amazon SQSMicrosoft.Orleans.Streaming.SQSStableYes, within SQS retentionNoAWS account, queue permissions, region/endpoint configuration
ADO.NETMicrosoft.Orleans.Streaming.AdoNetAlphaYes, in relational tables until expiry/dead-letter evictionNoSupported database, ADO.NET driver, and Orleans streaming SQL schema
NATS JetStreamMicrosoft.Orleans.Streaming.NATSAlphaConfigurable; file storage is the defaultNoNATS server with JetStream and sufficient storage; subject/stream administration
Redis StreamsMicrosoft.Orleans.Streaming.RedisAlphaConfigurable through Redis persistence and stream retentionYes, while entries remainRedis deployment, persistence/HA policy, and retention sizing

Alpha packages have an alpha.1 version suffix. Treat their APIs and operational behavior as prerelease, validate failure modes under load, and pin versions deliberately.

Kafka and Azure Service Bus aren’t built-in Orleans stream providers. Integrate them through application code or a custom persistent-stream queue adapter rather than configuring a nonexistent built-in provider.

Register memory streams with AddMemoryStreams. They use silo memory for queues and cache, so events don’t survive cluster loss. Rewind works only while the relevant event remains in the live in-memory cache. Use this provider for local development, tests, and workloads where loss is explicitly acceptable.

Register Azure Queue streams with AddAzureQueueStreams. The provider uses multiple Azure Queue Storage queues and persistent-stream pulling agents. It isn’t rewindable, and Azure Queue retries can produce duplicates or reorder delivery after failures.

Configure the current QueueServiceClient directly on AzureQueueOptions. When QueueNames is unset, Orleans generates names from the Orleans service ID, provider name, and queue ID. Keep the service ID and provider name stable across restarts. Set queue names explicitly only when you need to manage an existing queue topology, and keep those names unique across clusters that share a storage account.

var queueEndpoint =
new Uri(configuration["AZURE_QUEUE_STORAGE_ENDPOINT"]!);
var credential = new DefaultAzureCredential();
hostBuilder.UseOrleans(siloBuilder =>
{
siloBuilder
.AddAzureQueueStreams(
TemperatureStreams.ProviderName,
streams => streams.ConfigureAzureQueue(
optionsBuilder => optionsBuilder.Configure(options =>
options.QueueServiceClient =
new QueueServiceClient(queueEndpoint, credential))))
.AddAzureTableGrainStorage(
"PubSubStore",
options => options.TableServiceClient =
new TableServiceClient(
new Uri(configuration["AZURE_TABLE_STORAGE_ENDPOINT"]!),
credential));
});
hostBuilder.UseOrleans(siloBuilder =>
{
siloBuilder
.AddAzureQueueStreams(
TemperatureStreams.ProviderName,
streams => streams.ConfigureAzureQueue(
optionsBuilder => optionsBuilder.Configure(options =>
options.QueueServiceClient =
new QueueServiceClient(connectionString))))
.AddAzureTableGrainStorage(
"PubSubStore",
options => options.TableServiceClient =
new TableServiceClient(connectionString));
});

The examples use durable Azure Table Storage for PubSubStore; queue durability alone doesn’t preserve explicit subscription records.

Register Azure Event Hubs with AddEventHubStreams. Event Hubs retention and partition positions make this provider rewindable. Configure a consumer group dedicated to the Orleans application and durable checkpoint storage. Partition count bounds physical read parallelism, and retention bounds how far recovery can rewind.

The Event Hubs provider supports a custom data adapter for provider-specific wire formats. See Integrate external stream producers and consumers when a non-Orleans application must publish to or consume from the same Event Hub.

Register Amazon Kinesis Data Streams with AddKinesisStreams. Kinesis retains events independently of Orleans, and the provider persists each shard’s last delivered sequence number so that delivery can resume after shutdown or queue reassignment. See Stream with Amazon Kinesis for configuration, checkpoint choices, and operational constraints.

Register Amazon SQS with AddSqsStreams. Standard queues use at-least-once delivery, and SQS redelivers after the visibility timeout when processing isn’t acknowledged. The Orleans provider isn’t rewindable. Configure credentials using the deployment environment’s AWS credential chain or protected connection configuration, and monitor queue age, redelivery, and dead-letter policy.

Register ADO.NET streaming with AddAdoNetStreams. Install the matching database driver and apply the SQL Server, PostgreSQL, or MySQL streaming schema shipped in the package source. Messages are durable in relational tables but expire and can move to dead letters according to AdoNetStreamOptions. The provider isn’t rewindable.

Register NATS JetStream with AddNatsStreams. The provider creates or uses a JetStream stream and deterministic subject partitions. File-backed storage is the default; memory-backed JetStream storage is optional and not durable across server loss. Changes to NatsOptions.PartitionCount require corresponding server-side stream updates. The provider isn’t rewindable.

Register Redis Streams with AddRedisStreams. The provider stores events and checkpoints in Redis and is rewindable while entries remain. Redis durability depends on its persistence and replication configuration. RedisStreamingOptions.MaxStreamLength can bound retention; without it, stream length is unbounded, so capacity planning is required.

A persistent-stream data adapter customizes the wire format used by Azure Queue Storage or Azure Event Hubs while retaining that provider’s transport, partitioning, acknowledgement, cache, and recovery behavior.

PersistentStreamProvider hosts providers built on IQueueAdapter. A custom queue adapter supplies enqueue/dequeue behavior, queue mapping, rewindability, and failure handling while Orleans supplies pulling agents, subscription routing, and caches. See Write a custom persistent-stream queue adapter for an implementation guide and stream implementation architecture for the runtime design.