Annie  Emard

Annie Emard

1625421600

Hangfire + MediatR = Message Dispatcher

You can use two popular libraries in MediatR and Hangfire to create a pretty cool solution to move messaging out-of-process into a separate worker. Here’s how you can take these two libraries and use them together.

πŸ”” Subscribe: https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw?sub_confirmation=1

πŸ’₯ Join this channel to get access to source code, demos, and slides!
https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw/join

Why use MediatR:
https://codeopinion.com/why-use-mediatr-3-reasons-why-and-1-reason-not/

Source:
https://github.com/dcomartin/LooselyCoupledMonolith/tree/HangfireMediatR

πŸ“ Blog: https://codeopinion.com

πŸ“š Book Recommendations

Domain-Driven Design
https://amzn.to/2QwG8sb

Patterns of Enterprise Application Architecture
https://amzn.to/3d8kMJj

Refactoring: Improving the Design of Existing Code
https://amzn.to/2NVdP5Q

Monolith to Microservices: Evolutionary Patterns to Transform Your Monolith
https://amzn.to/3srUuZ6

RESTful Web Clients: Enabling Reuse Through Hypermedia
https://amzn.to/3d8Q96B

0:00 Intro
0:38 MediatR Example
1:25 Configure Hangfire
2:27 MediatR Wrapper/Bridge
3:20 MediatR Extension Method
4:37 Hangfire Serialization
8:00 Hangfire Extensibility
9:53 Summary

CodeOpinon: https://codeopinion.com
Twitter: https://twitter.com/codeopinion

#dotnet #messaging #softwarearchitecture

#hangfire #mediatr #dotnet #messaging #softwarearchitecture

Hangfire + MediatR = Message Dispatcher