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

Questions

Answer the following questions to test your knowledge of this chapter:

  1. In the producer-consumer pattern, is both a producer and consumer required for the pattern to work?
  2. Are there obstacles to learning or adopting the producer-consumer pattern for software engineers? If so, what are some examples?
  3. What are the benefits of using minimal APIs in .NET 7? What are the drawbacks?
  4. Which is the primary library used to facilitate the use of Kafka in the example code?
  5. Which base class is used to construct the producer and consumer service classes?
  6. Can configuration files such as appsettings.json be used to configure complex objects such as ProducerConfig and ConsumerConfig?
  7. Is it generally a good idea to create topics with multiple partitions? Why or why not?
  8. What's the difference between a stream and a table in Kafka?