![]() |
VOOZH | about |
dotnet add package Microsoft.Orleans.Reminders.AdoNet --version 10.2.0
NuGet\Install-Package Microsoft.Orleans.Reminders.AdoNet -Version 10.2.0
<PackageReference Include="Microsoft.Orleans.Reminders.AdoNet" Version="10.2.0" />
<PackageVersion Include="Microsoft.Orleans.Reminders.AdoNet" Version="10.2.0" />Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Reminders.AdoNet" />Project file
paket add Microsoft.Orleans.Reminders.AdoNet --version 10.2.0
#r "nuget: Microsoft.Orleans.Reminders.AdoNet, 10.2.0"
#:package Microsoft.Orleans.Reminders.AdoNet@10.2.0
#addin nuget:?package=Microsoft.Orleans.Reminders.AdoNet&version=10.2.0Install as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Reminders.AdoNet&version=10.2.0Install as a Cake Tool
Microsoft Orleans Reminders for ADO.NET provides persistence for Orleans reminders using ADO.NET-compatible databases (SQL Server, MySQL, PostgreSQL, etc.). This allows your Orleans applications to schedule persistent reminders that will be triggered even after silo restarts or grain deactivation.
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Reminders.AdoNet
You will also need to install the appropriate ADO.NET provider for your database:
# For SQL Server
dotnet add package Microsoft.Data.SqlClient
# For MySQL
dotnet add package MySql.Data
# For PostgreSQL
dotnet add package Npgsql
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Configuration;
using Orleans.Hosting;
using Example;
// Create a host builder
var builder = Host.CreateApplicationBuilder(args);
builder.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure ADO.NET as reminder storage
.UseAdoNetReminderService(options =>
{
options.Invariant = "Microsoft.Data.SqlClient"; // For SQL Server
options.ConnectionString = "Server=localhost;Database=OrleansReminders;User ID=orleans;******;";
});
});
// Build and start the host
var host = builder.Build();
await host.StartAsync();
// Get a grain reference and use it
var grain = host.Services.GetRequiredService<IGrainFactory>().GetGrain<IReminderGrain>("my-reminder-grain");
await grain.StartReminder("DailyReport");
Console.WriteLine("Reminder started successfully!");
// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();
using System;
using System.Threading.Tasks;
using Orleans;
using Orleans.Runtime;
namespace Example;
public interface IReminderGrain : IGrainWithStringKey
{
Task StartReminder(string reminderName);
Task StopReminder();
}
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;
}
}
For more comprehensive documentation, please refer to:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Microsoft.Orleans.Reminders.AdoNet:
| Package | Downloads |
|---|---|
|
Microsoft.Orleans.OrleansSqlUtils
Library of utility types for relational storage of Microsoft Orleans |
|
|
KingMetal.Domains.Abstractions
Package Description |
|
|
Mtl.Infrastructures.Workers
主要是封装了下Netty服务器和客户端的方法,提供了简单的方法调用就能启动Netty服务器和客户端,封装了Orleans的服务器和客户端的启动和连接方法,使操作简单,减少重复的代码 |
|
|
Orleans.AdoNet.Extensions
Orleans extensions for configuring cluster,reminder,grain persistence and so on |
|
|
iTool.ClusterComponent
为NetCore提供 In Process 可靠的/高速的 缓存、队列等常用分布式组件。 无第三方依赖的开发友好、运维友好型框架 |
Showing the top 4 popular GitHub repositories that depend on Microsoft.Orleans.Reminders.AdoNet:
| Repository | Stars |
|---|---|
|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
|
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
|
|
|
OrleansContrib/Orleans.Sagas
A distributed saga implementation for Orleans
|
|
|
shinyorg/templates
dotnet CLI & Visual Studio Templates
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.2.0 | 769 | 6/12/2026 |
| 10.1.1-preview.1 | 103 | 5/13/2026 |
| 10.1.0 | 27,699 | 4/14/2026 |
| 10.0.1 | 39,014 | 2/7/2026 |
| 10.0.0 | 8,140 | 1/20/2026 |
| 10.0.0-rc.2 | 550 | 12/31/2025 |
| 9.2.1 | 82,619 | 7/16/2025 |
| 9.2.0 | 6,053 | 7/14/2025 |
| 9.2.0-preview3 | 477 | 6/10/2025 |
| 9.2.0-preview2 | 300 | 6/4/2025 |
| 9.2.0-preview1 | 390 | 4/4/2025 |
| 9.1.2 | 45,890 | 2/13/2025 |
| 3.8.1 | 2,551 | 4/24/2026 |
| 3.8.0 | 9,184 | 5/6/2025 |
| 3.8.0-preview5 | 330 | 5/12/2025 |
| 3.8.0-preview3 | 326 | 4/8/2025 |
| 3.8.0-preview2 | 244 | 4/4/2025 |
| 3.8.0-preview1 | 301 | 3/31/2025 |