Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start Redis reminder. 'Orleans.Timers.IReminderRegistry' has not been registered. #8446

Closed
idanbenyehoshua opened this issue May 22, 2023 · 3 comments · Fixed by #8629

Comments

@idanbenyehoshua
Copy link

idanbenyehoshua commented May 22, 2023

Hi,
Trying to use reminder backed by Redis but when I try to get an reminder or register new reminder I get the message (in exception):
The requested service 'Orleans.Timers.IReminderRegistry' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
I register the reminder like that:
siloBuilder.UseRedisReminderService((opt) => opt.ConfigurationOptions = myRedisConfiguration). Configure<ClusterOptions>((opt) => opt.ServiceId = "myService");
when I replace the reminder with UseInMemoryReminderService it works perfect.
** I register the Redis persistence storage exactly like UseRedisReminderService (opt.ConfigurationOptions = myRedisConfiguration) and it works as excepted.
Nuget: Microsoft.Orleans.Reminders.Redis 7.1.2-beta1

@ghost ghost added the Needs: triage 🔍 label May 22, 2023
@idanbenyehoshua
Copy link
Author

idanbenyehoshua commented May 23, 2023

I think I found the problem, AddReminder is missing.
When I manually add siloBuilder.AddReminders(); it works.
I would like to fix it and create PR. Can someone please explain what is the procedure to create PR?
I cloned this repo to my local machine and fix it locally. From here, how can I open PR?
Thanks.

@snovak7
Copy link

snovak7 commented Sep 11, 2023

@ReubenBond was this perhaps fixed in 7.2.1? Based on

public static ISiloBuilder UseRedisReminderService(this ISiloBuilder builder, Action<RedisReminderTableOptions> configure)
{
builder.ConfigureServices(services => services.UseRedisReminderService(configure));
return builder;
}

It's missing AddReminders() like here:
public static ISiloBuilder UseInMemoryReminderService(this ISiloBuilder builder)
{
builder.AddReminders();
// The reminder table is a reference to a singleton IReminderTableGrain.
builder.ConfigureServices(services => services.UseInMemoryReminderService());
return builder;
}

@ReubenBond
Copy link
Member

Good point, @snovak7. I've opened a PR to fix it: #8629

@ghost ghost added the Status: Fixed label Sep 11, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants