Microsoft.Orleans.Reminders.Redis
10.3.1
Prefix Reserved
dotnet add package Microsoft.Orleans.Reminders.Redis --version 10.3.1
NuGet\Install-Package Microsoft.Orleans.Reminders.Redis -Version 10.3.1
<PackageReference Include="Microsoft.Orleans.Reminders.Redis" Version="10.3.1" />
<PackageVersion Include="Microsoft.Orleans.Reminders.Redis" Version="10.3.1" />
<PackageReference Include="Microsoft.Orleans.Reminders.Redis" />
paket add Microsoft.Orleans.Reminders.Redis --version 10.3.1
#r "nuget: Microsoft.Orleans.Reminders.Redis, 10.3.1"
#:package Microsoft.Orleans.Reminders.Redis@10.3.1
#addin nuget:?package=Microsoft.Orleans.Reminders.Redis&version=10.3.1
#tool nuget:?package=Microsoft.Orleans.Reminders.Redis&version=10.3.1
Microsoft Orleans Reminders for Redis
Introduction
Microsoft Orleans Reminders for Redis provides persistence for Orleans reminders using Redis. This allows your Orleans applications to schedule persistent reminders that will be triggered even after silo restarts or grain deactivation.
Getting Started
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Reminders.Redis
Example - Configuring Redis Reminders
using Microsoft.Extensions.Hosting;
using Orleans.Configuration;
using Orleans.Hosting;
var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure Redis as reminder storage
.UseRedisReminderService(options =>
{
options.ConnectionString = "localhost:6379";
options.Database = 0;
options.KeyPrefix = "reminder-"; // Optional prefix for Redis keys
});
});
// Run the host
await builder.RunAsync();
Example - Using Reminders in a Grain
public class ReminderGrain : Grain, IReminderGrain, IRemindable
{
private string _reminderName = "MyReminder";
public async Task StartReminder(string reminderName)
{
_reminderName = reminderName;
// Register a persistent reminder
await RegisterOrUpdateReminder(
reminderName,
TimeSpan.FromMinutes(2), // Time to delay before the first tick (must be > 1 minute)
TimeSpan.FromMinutes(5)); // Period of the reminder (must be > 1 minute)
}
public async Task StopReminder()
{
// Find and unregister the reminder
var reminder = await GetReminder(_reminderName);
if (reminder != null)
{
await UnregisterReminder(reminder);
}
}
public Task ReceiveReminder(string reminderName, TickStatus status)
{
// This method is called when the reminder ticks
Console.WriteLine($"Reminder {reminderName} triggered at {DateTime.UtcNow}. Status: {status}");
return Task.CompletedTask;
}
}
Configuration via Microsoft.Extensions.Configuration
You can configure Orleans Redis reminders using Microsoft.Extensions.Configuration (such as appsettings.json) instead of configuring it in code. When using this approach, Orleans will automatically read the configuration from the Orleans section.
Note: You can use either
"ProviderType": "Redis"or"ProviderType": "AzureRedisCache"- both are supported and functionally equivalent.
Example - appsettings.json
{
"ConnectionStrings": {
"redis": "localhost:6379"
},
"Orleans": {
"ClusterId": "my-cluster",
"ServiceId": "MyOrleansService",
"Reminders": {
"ProviderType": "Redis",
"ServiceKey": "redis",
"Database": 0,
"KeyPrefix": "reminder-"
}
}
}
.NET Aspire Integration
For applications using .NET Aspire, consider using the .NET Aspire Redis integration which provides simplified Redis configuration, automatic service discovery, health checks, and telemetry. The Aspire integration automatically configures connection strings that Orleans can consume via the configuration system.
Example - Program.cs with Aspire Redis Integration
using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
using Microsoft.Extensions.DependencyInjection;
var builder = Host.CreateApplicationBuilder(args);
// Add service defaults (Aspire configurations)
builder.AddServiceDefaults();
// Add Redis via Aspire client integration
builder.AddKeyedRedisClient("redis");
// Add Orleans
builder.UseOrleans();
var host = builder.Build();
await host.StartAsync();
// Get a reference to a grain and call it
var client = host.Services.GetRequiredService<IClusterClient>();
var grain = client.GetGrain<IReminderGrain>("user123");
await grain.StartReminder("AspireReminder");
Console.WriteLine("Reminder started with Aspire Redis!");
await host.WaitForShutdownAsync();
This example assumes your AppHost project has configured Redis like this:
// In your AppHost/Program.cs
var builder = DistributedApplication.CreateBuilder(args);
var redis = builder.AddRedis("redis");
var orleans = builder.AddOrleans("orleans")
.WithReminders(redis);
builder.AddProject<Projects.MyOrleansApp>("orleans-app")
.WithReference(orleans);
builder.Build().Run();
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. |
-
net10.0
- 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.Reminders (>= 10.3.1)
- Microsoft.Orleans.Runtime (>= 10.3.1)
- Newtonsoft.Json (>= 13.0.4)
- Polly (>= 8.6.4)
- Polly.Extensions (>= 8.6.5)
- StackExchange.Redis (>= 2.11.0)
- System.IO.Hashing (>= 10.0.3)
- System.Memory.Data (>= 10.0.3)
-
net8.0
- 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.Reminders (>= 10.3.1)
- Microsoft.Orleans.Runtime (>= 10.3.1)
- Newtonsoft.Json (>= 13.0.4)
- Polly (>= 8.6.4)
- Polly.Extensions (>= 8.6.5)
- StackExchange.Redis (>= 2.11.0)
- System.IO.Hashing (>= 10.0.3)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory.Data (>= 8.0.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Microsoft.Orleans.Reminders.Redis:
| Package | Downloads |
|---|---|
|
Cszy.Orleans
Cszy.Orleans是Cszy应用框架对Orleans的封装 |
|
|
iTool.ShareLibrary.Framework
Package Description |
|
|
SiloX.Orleans.Reminders.Redis
Redis reminders module that for Microsoft Orleans. |
|
|
Aero.Cms.AppServer
Package Description |
|
|
Escendit.Extensions.Hosting.Orleans
Escendit.Extensions.Hosting.Orleans provides streamlined hosting extensions for Microsoft Orleans, offering simplified configuration and dependency injection setup for building robust, distributed applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.3.1 | 1,208 | 8/28/2026 |
| 10.3.0 | 159 | 8/27/2026 |
| 10.3.0-rc.1 | 63 | 8/25/2026 |
| 10.2.2 | 16,335 | 7/21/2026 |
| 10.2.2-rc.2 | 111 | 7/15/2026 |
| 10.2.2-rc.1 | 115 | 7/10/2026 |
| 10.2.1 | 40,001 | 6/24/2026 |
| 10.2.1-preview.1 | 127 | 6/19/2026 |
| 10.2.0 | 8,018 | 6/12/2026 |
| 10.1.1-preview.1 | 84 | 5/13/2026 |
| 10.1.0 | 49,621 | 4/14/2026 |
| 10.0.1 | 41,286 | 2/7/2026 |
| 10.0.0 | 5,431 | 1/20/2026 |
| 10.0.0-rc.2 | 353 | 12/31/2025 |
| 9.2.1 | 105,659 | 7/16/2025 |
| 9.2.0 | 804 | 7/14/2025 |
| 9.2.0-preview3 | 733 | 6/10/2025 |
| 9.2.0-preview2 | 271 | 6/4/2025 |
| 9.2.0-preview1 | 3,170 | 4/4/2025 |
| 9.1.2 | 40,268 | 2/13/2025 |