Publish Subscribe Messaging In .NET With Redis Channels

preview_player
Показать описание

What is the Publish Subscribe pattern?

The Publish-Subscribe pattern is a messaging pattern, where a Publisher sends messages to a common channel, and Subscribers can listen to messages coming from that channel. It's common to have one Publisher and more than one Subscriber. If you are building a distributed system, you will most likely work with the Publish Subscribe pattern.

Join my weekly .NET newsletter:

Read my Blog here:

Subscribe for more:

Chapters
0:00 Worker services overview
0:51 How we can use Redis for Pub/Sub messaging
1:28 Installing the StackExchange.Redis library
2:00 Publishing messages to the Redis channel
5:19 Subscribing to messages from the Redis channel
6:43 Running Redis locally with Docker
7:30 Pub/Sub messaging with Redis channels in action
8:35 Sending JSON messages with Redis channels
11:47 Are Redis channels reliable?
Рекомендации по теме
Комментарии
Автор

Great job, Milan! Your explanation was clear and concise.

sekarcse
Автор

Thank u .I started learning Reddis database.. for each usecase of reddis I found ur demo thanks for sharing your knowledge

juhairahamed
Автор

Thanks for this simple and straighforward explanation. I noticed that Redis Channels are a better solution than Rabbit MQ in smaller companies that don't have a solid infrastructure.

amjad-se
Автор

Great content brother.. I need to implement a redis pub-sub at work and i do not have that experience. I am gonna use this video as my reference to get started!!

apurvsingh
Автор

0:46 - "these are the logs coming from the subscriber and these are the logs coming from the publisher"
We don't see your cursor in the video. I assume the left window is the publisher and the right window is the subscriber.
0:58 - "[...] using rediSH channels. If you are not familiar with rediS, [...]"
This is nitpicking, but what is the correct pronunciation? Is it both okay?

Автор

thanks, do you use much about MassTransit? for Azure service bus

TheZhouh
Автор

Would you consider using redis as a message broker in production? Or does it have some obvious cons compared to rabbitmq, or azure service bus?

Sultan-esvi
Автор

Is it possible to publish message without getting subscriber so that it can be broadcasted to everyone?

microtech
Автор

Hi Milan, Thanks for the great video. I have a question though. What will happen if the publisher published the messages but the subscribing applications only run a day after? Where will the messages be stored and is it possible to get all the messages at once?

ThiNguyen-bmln
Автор

Would like to see how this could be used in a distributed system with multiple subscribers to balance load but with each message being processed at most once. In your example with two subscribers each message was getting processed twice.

I’m in a system where I don’t control the publisher, but would like to have more than one subscriber to balance the load of processing the data, but don’t want to waste compute by processing each message more than once.

ClAddict
Автор

can we publish binary images with json to redis channels? Great vids by the way, I watch your channel and I'm a huge fan.... thanks!

Paul-uosv
Автор

I am surprised I am so unsed to Javascript I noticed the use of Visual Studio but it was off some how not to see vscode... it took me a few minutes before realizing it was C# LoL

Luxcium
Автор

Hi milan, can u do video on dapr pub sub

sujitbhandarkar
Автор

I have erros : State Details
operator RedisChannel(string)' is obsolete: 'It is preferable to explicitly specify a PatternMode, or use the Literal/Pattern methods' Application.How to fix it

nhimblog