Uploaded June 2020 | Updated September 2026, 1 week ago
Unit Testing experience of Azure Service Bus based applications is less than ideal. Azure Service Bus has no emulator unlike, Azure Queues, Blobs, Cosmos DB etc. In this video, I introduce the Adapter Design Pattern and show you how you could build an adapter that allows unit testing Message Broker based applications on the local developer machine using RabbitMQ, not matter what cloud based Message Broker you may be using in production.
Chapter Markers
00:00 Intro
01:42 Introducing the Adapter Design Pattern UML
06:07 Intent of the Adapter Pattern
07:37 Introduction of the Message Broker Adapters
11:58 When and Why would you use the Adapter Design Pattern
21:37 Real World examples of Adapters
24:40 Alexa as an Adapter
29:21 The Adapter Puzzle - Visual
32:54 The Configuration Provider Design Pattern
38:20 Introducing the MessageBrokerPublisherBase (Adapter)
43:45 Introducing RabbitMQ Publisher Adapter
46:21 Introducing the Service Bus Publisher Adapter
48:23 Introducing the MessageBrokerSubscriberBase (Adapter)
50:06 Introducing RabbitMQ Subscriber Adapter
54:16 Introducing Service Bus Subscriber Adapter
57:23 Seeing it in Action
58:00 The Main Application (Agnostic of actual brokers)
59:05 The MessageBroker Factory
01:02:30 Running the Application using the RabbitMQ Publisher & Subscriber
01:04:51 Running the Application using the Service Bus Publisher & Subscriber
01:05:40 Conclusion
Source code used in this video
github.com/matlus/Adapter-Design-Pattern-Message-Brokers
Unit Testing experience of Azure Service Bus based applications is less than ideal. Azure Service Bus has no emulator unlike, Azure Queues, Blobs, Cosmos DB etc. In this video, I introduce the Adapter Design Pattern and show you how you could build an adapter that allows unit testing Message Broker based applications on the local developer machine using RabbitMQ, not matter what cloud based Message Broker you may be using in production.
Chapter Markers
00:00 Intro
01:42 Introducing the Adapter Design Pattern UML
06:07 Intent of the Adapter Pattern
07:37 Introduction of the Message Broker Adapters
11:58 When and Why would you use the Adapter Design Pattern
21:37 Real World examples of Adapters
24:40 Alexa as an Adapter
29:21 The Adapter Puzzle - Visual
32:54 The Configuration Provider Design Pattern
38:20 Introducing the MessageBrokerPublisherBase (Adapter)
43:45 Introducing RabbitMQ Publisher Adapter
46:21 Introducing the Service Bus Publisher Adapter
48:23 Introducing the MessageBrokerSubscriberBase (Adapter)
50:06 Introducing RabbitMQ Subscriber Adapter
54:16 Introducing Service Bus Subscriber Adapter
57:23 Seeing it in Action
58:00 The Main Application (Agnostic of actual brokers)
59:05 The MessageBroker Factory
01:02:30 Running the Application using the RabbitMQ Publisher & Subscriber
01:04:51 Running the Application using the Service Bus Publisher & Subscriber
01:05:40 Conclusion
Source code used in this video
github.com/matlus/Adapter-Design-Pattern-Message-Brokers

