Replies: 1 comment
-
The error message is telling you that there's no service registered for the ChannelReader (and ChannelWriter). You can do something like this in ConfigureServices: public void ConfigureServices(IServiceCollection services)
{
// You should use a bounded channel, you'll need to adjust the queue size based on whatever performance metrics you have.
var channel = Channel.CreateBounded<SendMailChanel>(100);
services.AddSingleton(channel.Reader);
services.AddSingleton(channel.Writer);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want using chanel in backgroundservice, but I have this error when run my code, what I need to do.
Sorry for bad english
Beta Was this translation helpful? Give feedback.
All reactions