Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Implementing Event-Driven Microservices Architecture in .NET 7

You're reading from   Implementing Event-Driven Microservices Architecture in .NET 7 Develop event-based distributed apps that can scale with ever-changing business demands using C# 11 and .NET 7

Arrow left icon
Product type Paperback
Published in Mar 2023
Publisher Packt
ISBN-13 9781803232782
Length 326 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Joshua Garverick Joshua Garverick
Author Profile Icon Joshua Garverick
Joshua Garverick
Omar Dean McIver Omar Dean McIver
Author Profile Icon Omar Dean McIver
Omar Dean McIver
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1:Event-Driven Architecture and .NET 7
2. Chapter 1: The Sample Application FREE CHAPTER 3. Chapter 2: The Producer-Consumer Pattern 4. Chapter 3: Message Brokers 5. Chapter 4: Domain Model and Asynchronous Events 6. Part 2:Testing and Deploying Microservices
7. Chapter 5: Containerization and Local Environment Setup 8. Chapter 6: Localized Testing and Debugging of Microservices 9. Chapter 7: Microservice Observability 10. Chapter 8: CI/CD Pipelines and Integrated Testing 11. Chapter 9: Fault Injection and Chaos Testing 12. Part 3:Testing and Deploying Microservices
13. Chapter 10: Modern Design Patterns for Scalability 14. Chapter 11: Minimizing Data Loss 15. Chapter 12: Service and Application Resiliency 16. Chapter 13: Telemetry Capture and Integration 17. Chapter 14: Observability Revisited 18. Assessments 19. Index 20. Other Books You May Enjoy

Exploring implementation details in code

There are several ways in which the producer-consumer pattern can be implemented in code. Some samples can be downloaded and run, along with custom implementations that you might find in domain libraries or core (shared) libraries. First, we will look at sample code that uses the Confluent libraries for Kafka, which provide a simple and easy-to-understand abstraction layer for interacting with Kafka . The source projects for each of the components (producers and consumers) can be found in the chapter folder on GitHub, along with a bootstrap script to download and run Kafka locally. Please ensure that you have Docker installed, as the install is dependent upon running docker compose. The start order for this example code will be to run docker compose up, then to right-click on the consumer project and select Debug > Start New Instance, then to right-click on the producer project and select Debug > Start New Instance.

The producer...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime