Using Channel class for pub/sub design in C# (System.Threading.Channels)

Опубликовано: 05 Октябрь 2024
на канале: DotNet Core Central
4,423
91

C# Threadding channel can be used for implementing decoupled applications through producer/consumer design for in-process data communication.

00:00 - Introduction
00:45 - Creating a new Channel
01:32 - Unbounded channel details
03:55 - Bounded channel details
05:40 - FullMode property
06:30 - Item dropped callback
07:55 - Creating data producer and data consumer
08:40 - How to read messages from a channel
10:30 - How to write messages into a channel
11:40 - Debugging the application to demonstrate the channel implementation

#csharp #dotnet #channel #dotnet7 #csharp11

Some of my popular videos:

Elasticsearch with .NET and introduction:    • An Introduction to Elasticsearch (Bui...  

Hangfire Scheduling an introduction:    • Scheduling recurring jobs with Hangfi...  

ASP.NET Core Authentication with JWT (JSON Web Token):    • ASP.NET Core Authentication with JWT ...  

Running Background tasks using IHostedService and BackgroundService (In ASP.NET Core 3.1):    • Running Background tasks using IHoste...  

How to build an API Gateway in ASP.NET Core using Ocelot (Build API Gateway in a few minutes):    • How to build an API Gateway in ASP.NE...  

My blog site: https://dotnetcorecentral.com