Microsoft.Orleans.Reminders.DynamoDB 9.2.0-preview2

Prefix Reserved
This is a prerelease version of Microsoft.Orleans.Reminders.DynamoDB.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.Orleans.Reminders.DynamoDB --version 9.2.0-preview2
                    
NuGet\Install-Package Microsoft.Orleans.Reminders.DynamoDB -Version 9.2.0-preview2
                    
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.Reminders.DynamoDB" Version="9.2.0-preview2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Orleans.Reminders.DynamoDB" Version="9.2.0-preview2" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Reminders.DynamoDB" />
                    
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.Reminders.DynamoDB --version 9.2.0-preview2
                    
#r "nuget: Microsoft.Orleans.Reminders.DynamoDB, 9.2.0-preview2"
                    
#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.Reminders.DynamoDB@9.2.0-preview2
                    
#: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.Reminders.DynamoDB&version=9.2.0-preview2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Reminders.DynamoDB&version=9.2.0-preview2&prerelease
                    
Install as a Cake Tool

Microsoft Orleans Reminders for DynamoDB

Introduction

Microsoft Orleans Reminders for DynamoDB provides persistence for Orleans reminders using Amazon's DynamoDB. 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.DynamoDB

Example - Configuring DynamoDB Reminders

using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Configuration;
using Orleans.Hosting;

var builder = Host.CreateApplicationBuilder(args)
    .UseOrleans(siloBuilder =>
    {
        siloBuilder
            .UseLocalhostClustering()
            // Configure DynamoDB as reminder storage
            .UseDynamoDBReminderService(options =>
            {
                options.AccessKey = "YOUR_AWS_ACCESS_KEY";
                options.SecretKey = "YOUR_AWS_SECRET_KEY";
                options.Region = "us-east-1";
                options.TableName = "OrleansReminders";
                options.CreateIfNotExists = true;
            });
    });

// Run the host
var host = builder.Build();
await host.StartAsync();

// Get a reference to the grain
var reminderGrain = host.Services.GetRequiredService<IGrainFactory>()
    .GetGrain<IReminderGrain>("my-reminder-grain");

// Start the reminder
await reminderGrain.StartReminder("ExampleReminder");
Console.WriteLine("Reminder started!");

// 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 ReminderExample;

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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Microsoft.Orleans.Reminders.DynamoDB:

Package Downloads
Microsoft.Orleans.OrleansAWSUtils

Library of utility types for Amazon AWS of Microsoft Orleans.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.2.1 2,476 7/16/2025
9.2.0 534 7/14/2025
9.2.0-preview3 324 6/10/2025
9.2.0-preview2 166 6/4/2025
9.2.0-preview1 1,259 4/4/2025
9.1.2 38,130 2/13/2025
9.0.1 32,914 11/23/2024
9.0.0 770 11/14/2024
8.2.0 30,566 7/12/2024
8.2.0-preview1 196 5/22/2024
8.1.0 42,572 4/17/2024
8.1.0-preview3 159 3/11/2024
8.1.0-preview2 138 2/23/2024
8.1.0-preview1 138 2/13/2024
8.0.0 42,639 1/5/2024
8.0.0-rc2 275 12/20/2023
8.0.0-rc1 182 12/4/2023
7.2.7 162 10/15/2024
7.2.6 5,551 3/9/2024
7.2.5 196 2/22/2024
7.2.4 10,694 12/2/2023
7.2.3 4,364 11/3/2023
7.2.2 4,543 10/16/2023
7.2.1 14,246 7/11/2023
7.2.0 286 7/7/2023
7.1.2 28,102 4/19/2023
7.1.1 7,840 3/23/2023
7.1.0 2,610 2/1/2023
7.0.0 16,226 11/8/2022
7.0.0-rc2 361 10/19/2022
4.0.0-preview2 1,692 8/4/2022
4.0.0-preview1 2,032 2/10/2022
3.8.0 195 5/6/2025
3.8.0-preview5 229 5/12/2025
3.8.0-preview3 174 4/8/2025
3.8.0-preview2 124 4/4/2025
3.8.0-preview1 182 3/31/2025
3.7.2 8,760 5/10/2024
3.7.1 16,173 5/27/2023
3.7.0 2,696 3/23/2023
3.6.5 39,693 8/15/2022
3.6.4 514 8/10/2022
3.6.3 516 8/4/2022
3.6.2 11,202 4/15/2022
3.6.1 841 4/5/2022
3.6.0 12,010 1/20/2022
3.5.1 6,307 11/8/2021
3.5.0 22,133 9/3/2021
3.4.4 550 10/4/2021
3.4.3 6,031 6/3/2021
3.4.2 2,451 4/5/2021
3.4.1 3,780 2/3/2021
3.4.0 84,927 1/6/2021
3.4.0-rc1 505 12/9/2020
3.3.0 15,808 9/9/2020
3.3.0-rc2 496 9/2/2020
3.3.0-rc1 486 8/19/2020
3.2.2 5,904 7/22/2020
3.2.1 854 7/2/2020
3.2.0 1,250 6/4/2020
3.2.0-rc2 548 5/20/2020
3.2.0-rc1 509 5/7/2020
3.1.7 1,984 5/19/2020
3.1.6 5,477 4/16/2020
3.1.5 765 4/9/2020
3.1.4 1,298 3/26/2020
3.1.3 1,035 3/16/2020
3.1.2 1,861 3/5/2020
3.1.0 786 2/23/2020
3.1.0-rc3 644 2/13/2020
3.1.0-rc2 640 2/12/2020
3.1.0-rc1 639 2/10/2020
3.0.2 15,807 12/12/2019
3.0.1 752 11/27/2019
3.0.0 948 10/24/2019
3.0.0-rc2 603 10/16/2019
3.0.0-rc1 556 10/9/2019
3.0.0-beta1 1,124 8/16/2019
2.4.5 13,115 12/29/2019
2.4.4 1,171 11/27/2019
2.4.3 1,486 10/10/2019
2.4.2 4,649 8/31/2019
2.4.1 1,537 8/14/2019
2.4.0 1,587 8/8/2019
2.3.6 1,744 7/24/2019
2.3.5 6,558 6/14/2019
2.3.4 1,672 6/4/2019
2.3.3 1,254 6/2/2019
2.3.2 1,970 5/9/2019
2.3.1 1,484 4/26/2019
2.3.0 3,114 3/20/2019
2.3.0-rc2 734 3/13/2019
2.3.0-rc1 823 3/4/2019
2.2.4 2,382 2/25/2019
2.2.3 2,681 1/17/2019
2.2.0 1,631 12/13/2018
2.2.0-rc1 898 12/4/2018
2.2.0-beta1 969 10/21/2018
2.1.2 3,734 10/11/2018
2.1.0 1,798 9/28/2018
2.1.0-rc2 1,256 9/21/2018
2.1.0-rc1 1,310 9/14/2018
2.1.0-beta1 1,249 8/27/2018
2.0.0 8,808 3/28/2018
2.0.0-rc2 5,038 3/13/2018
2.0.0-rc1 1,260 2/26/2018
2.0.0-beta3 3,162 12/21/2017