Book Image

Implementing Event-Driven Microservices Architecture in .NET 7

By : Joshua Garverick, Omar Dean McIver
4 (1)
Book Image

Implementing Event-Driven Microservices Architecture in .NET 7

4 (1)
By: Joshua Garverick, Omar Dean McIver

Overview of this book

This book will guide you through various hands-on practical examples for implementing event-driven microservices architecture using C# 11 and .NET 7. It has been divided into three distinct sections, each focusing on different aspects of this implementation. The first section will cover the new features of .NET 7 that will make developing applications using EDA patterns easier, the sample application that will be used throughout the book, and how the core tenets of domain-driven design (DDD) are implemented in .NET 7. The second section will review the various components of a local environment setup, the containerization of code, testing, deployment, and the observability of microservices using an EDA approach. The third section will guide you through the need for scalability and service resilience within the application, along with implementation details related to elastic and autoscale components. You’ll also cover how proper telemetry helps to automatically drive scaling events. In addition, the topic of observability is revisited using examples of service discovery and microservice inventories. By the end of this book, you’ll be able to identify and catalog domains, events, and bounded contexts to be used for the design and development of a resilient microservices architecture.
Table of Contents (21 chapters)
1
Part 1:Event-Driven Architecture and .NET 7
6
Part 2:Testing and Deploying Microservices
12
Part 3:Testing and Deploying Microservices

What is a message broker?

Simply put, a message broker is a piece of middleware that facilitates (or brokers) communication between two systems. While this sounds minimalistic, this basic concept can be expounded on for use cases such as the producer-consumer pattern, among others. Given the versatility of this type of middleware, it can be tempting to add additional processing features. Knowing when to add functionalities, such as data enrichment or transformation, is key to preventing product lock-in with a particular broker.

By means of domain-driven design (DDD) standards, keeping the implementation flexible while staying prescriptive on the interface functionality will yield the most consistent results. While you may not encounter a domain project that has 10 different concrete implementations of a broker or even a repository, it's not uncommon to have a few different options available. Often, you will see implementation classes for not only brokers but at least one type...