Microsoft.Orleans.Reminders.AdoNet
9.2.1
Prefix Reserved
dotnet add package Microsoft.Orleans.Reminders.AdoNet --version 9.2.1
NuGet\Install-Package Microsoft.Orleans.Reminders.AdoNet -Version 9.2.1
<PackageReference Include="Microsoft.Orleans.Reminders.AdoNet" Version="9.2.1" />
<PackageVersion Include="Microsoft.Orleans.Reminders.AdoNet" Version="9.2.1" />
<PackageReference Include="Microsoft.Orleans.Reminders.AdoNet" />
paket add Microsoft.Orleans.Reminders.AdoNet --version 9.2.1
#r "nuget: Microsoft.Orleans.Reminders.AdoNet, 9.2.1"
#:package Microsoft.Orleans.Reminders.AdoNet@9.2.1
#addin nuget:?package=Microsoft.Orleans.Reminders.AdoNet&version=9.2.1
#tool nuget:?package=Microsoft.Orleans.Reminders.AdoNet&version=9.2.1
Microsoft Orleans Reminders for ADO.NET
Introduction
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.
Getting Started
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 System.Data.SqlClient
# For MySQL
dotnet add package MySql.Data
# For PostgreSQL
dotnet add package Npgsql
Example - Configuring ADO.NET Reminders
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 = "System.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();
Example - Using Reminders in a Grain
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;
}
}
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 was computed. 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. |
-
net8.0
- Microsoft.AspNetCore.Connections.Abstractions (>= 8.0.11)
- 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.11)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Orleans.Analyzers (>= 9.2.1)
- Microsoft.Orleans.CodeGenerator (>= 9.2.1)
- Microsoft.Orleans.Reminders (>= 9.2.1)
- Microsoft.Orleans.Runtime (>= 9.2.1)
- Newtonsoft.Json (>= 13.0.3)
- System.Collections.Immutable (>= 8.0.0)
- System.IO.Hashing (>= 8.0.0)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory.Data (>= 8.0.1)
NuGet packages (10)
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 可靠的/高速的 缓存、队列等常用分布式组件。 无第三方依赖的开发友好、运维友好型框架 |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Microsoft.Orleans.Reminders.AdoNet:
Repository | Stars |
---|---|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
OrleansContrib/Orleans.Sagas
A distributed saga implementation for Orleans
|
|
shinyorg/templates
dotnet CLI & Visual Studio Templates
|
Version | Downloads | Last Updated |
---|---|---|
9.2.1 | 4,602 | 7/16/2025 |
9.2.0 | 435 | 7/14/2025 |
9.2.0-preview3 | 385 | 6/10/2025 |
9.2.0-preview2 | 208 | 6/4/2025 |
9.2.0-preview1 | 217 | 4/4/2025 |
9.1.2 | 31,160 | 2/13/2025 |
9.0.1 | 12,217 | 11/23/2024 |
9.0.0 | 2,483 | 11/14/2024 |
8.2.0 | 83,888 | 7/12/2024 |
8.2.0-preview1 | 344 | 5/22/2024 |
8.1.0 | 49,738 | 4/17/2024 |
8.1.0-preview3 | 173 | 3/11/2024 |
8.1.0-preview2 | 375 | 2/23/2024 |
8.1.0-preview1 | 178 | 2/13/2024 |
8.0.0 | 44,790 | 1/5/2024 |
8.0.0-rc2 | 526 | 12/20/2023 |
8.0.0-rc1 | 262 | 12/4/2023 |
7.2.7 | 4,336 | 10/15/2024 |
7.2.6 | 12,479 | 3/9/2024 |
7.2.5 | 577 | 2/22/2024 |
7.2.4 | 10,157 | 12/2/2023 |
7.2.3 | 18,069 | 11/3/2023 |
7.2.2 | 7,843 | 10/16/2023 |
7.2.1 | 28,110 | 7/11/2023 |
7.2.0 | 2,003 | 7/7/2023 |
7.1.2 | 63,170 | 4/19/2023 |
7.1.1 | 6,152 | 3/23/2023 |
7.1.0 | 9,509 | 2/1/2023 |
7.0.0 | 11,292 | 11/8/2022 |
7.0.0-rc2 | 570 | 10/19/2022 |
4.0.0-preview2 | 2,263 | 8/4/2022 |
4.0.0-preview1 | 2,712 | 2/10/2022 |
3.8.0 | 1,759 | 5/6/2025 |
3.8.0-preview5 | 242 | 5/12/2025 |
3.8.0-preview3 | 225 | 4/8/2025 |
3.8.0-preview2 | 145 | 4/4/2025 |
3.8.0-preview1 | 214 | 3/31/2025 |
3.7.2 | 53,916 | 5/10/2024 |
3.7.1 | 45,584 | 5/27/2023 |
3.7.0 | 7,105 | 3/23/2023 |
3.6.5 | 183,517 | 8/15/2022 |
3.6.4 | 2,217 | 8/10/2022 |
3.6.3 | 3,038 | 8/4/2022 |
3.6.2 | 61,949 | 4/15/2022 |
3.6.1 | 12,373 | 4/5/2022 |
3.6.0 | 162,117 | 1/20/2022 |
3.5.1 | 94,524 | 11/8/2021 |
3.5.0 | 144,380 | 9/3/2021 |
3.4.4 | 553 | 10/4/2021 |
3.4.3 | 36,266 | 6/3/2021 |
3.4.2 | 42,376 | 4/5/2021 |
3.4.1 | 138,063 | 2/3/2021 |
3.4.0 | 20,214 | 1/6/2021 |
3.4.0-rc1 | 483 | 12/9/2020 |
3.3.0 | 91,904 | 9/9/2020 |
3.3.0-rc2 | 499 | 9/2/2020 |
3.3.0-rc1 | 524 | 8/19/2020 |
3.2.2 | 90,852 | 7/22/2020 |
3.2.1 | 15,697 | 7/2/2020 |
3.2.0 | 11,738 | 6/4/2020 |
3.2.0-rc2 | 608 | 5/20/2020 |
3.2.0-rc1 | 555 | 5/7/2020 |
3.1.7 | 8,473 | 5/19/2020 |
3.1.6 | 6,842 | 4/16/2020 |
3.1.5 | 1,695 | 4/9/2020 |
3.1.4 | 3,087 | 3/26/2020 |
3.1.3 | 6,738 | 3/16/2020 |
3.1.2 | 11,906 | 3/5/2020 |
3.1.0 | 2,870 | 2/23/2020 |
3.1.0-rc3 | 594 | 2/13/2020 |
3.1.0-rc2 | 620 | 2/12/2020 |
3.1.0-rc1 | 665 | 2/10/2020 |
3.0.2 | 50,404 | 12/12/2019 |
3.0.1 | 17,051 | 11/27/2019 |
3.0.0 | 41,492 | 10/24/2019 |
3.0.0-rc2 | 659 | 10/16/2019 |
3.0.0-rc1 | 584 | 10/9/2019 |
3.0.0-beta1 | 45,376 | 8/16/2019 |
2.4.5 | 200,450 | 12/29/2019 |
2.4.4 | 45,296 | 11/27/2019 |
2.4.3 | 54,220 | 10/10/2019 |
2.4.2 | 23,859 | 8/31/2019 |
2.4.1 | 12,896 | 8/14/2019 |
2.4.0 | 3,094 | 8/8/2019 |
2.3.6 | 10,715 | 7/24/2019 |
2.3.5 | 31,699 | 6/14/2019 |
2.3.4 | 16,649 | 6/4/2019 |
2.3.3 | 3,211 | 6/2/2019 |
2.3.2 | 16,115 | 5/9/2019 |
2.3.1 | 12,653 | 4/26/2019 |
2.3.0 | 50,787 | 3/20/2019 |
2.3.0-rc2 | 3,489 | 3/13/2019 |
2.3.0-rc1 | 2,560 | 3/4/2019 |
2.2.4 | 4,717 | 2/25/2019 |
2.2.3 | 9,680 | 1/17/2019 |
2.2.0 | 11,696 | 12/13/2018 |
2.2.0-rc1 | 2,642 | 12/4/2018 |
2.2.0-beta1 | 3,211 | 10/21/2018 |
2.1.2 | 9,942 | 10/11/2018 |
2.1.0 | 7,686 | 9/28/2018 |
2.1.0-rc2 | 3,188 | 9/21/2018 |
2.1.0-rc1 | 3,290 | 9/14/2018 |
2.1.0-beta1 | 3,138 | 8/27/2018 |
2.0.0 | 14,989 | 3/28/2018 |
2.0.0-rc2 | 3,356 | 3/13/2018 |
2.0.0-rc1 | 3,279 | 2/26/2018 |
2.0.0-beta3 | 3,987 | 12/21/2017 |