What is a Command Bus?

Опубликовано: 11 Июнь 2026
на канале: Metaphorically Speaking
2,418
79

Bonus points for letting me know fun ways the metaphors/analogies fall apart! 🤣

What is a Command Bus?

In this video, we'll take a quick look at what a Command Bus is and how it is similar to a bridge connecting land together. We'll explore how the car is a Message which progresses through a Message Bus (which is what a Command Bus is) encountering different segments we can think of as Middleware until it eventually reaches the other side.

A Command Bus can be thought of as a bridge connecting two layers of our system. It allows them to communicate without either layer learning about each other - and avoiding the coupling as a result.

Specifically, in this video, we demonstrate how the Application layer can remain decoupled from the Framework layer (which can also be called User Interface layer).

This is just a quick introduction. There are many more topics which we could explore when it comes to Architecture (such as Onion, Hexagonal, Ports and Adapters, etc.) and many more topics we can explore when it comes to messaging, be it CQRS, Domain Events, publishing events, etc. etc.

If you liked this - please hit the like button and subscribe.

If you'd like me to create more videos - please share this with someone and spread the word of my channel because it's super difficult to grow an audience!!

🫶

---

0:00 Car is the Message
0:35 Bridge is the Command Bus
1:33 Example Code
2:25 Segments as Middleware
3:24 Exceptions!

---

Website: https://acairns.co.uk
Twitter:   / andrewcairns  
Patreon:   / acairns  
Substack: https://acairns.substack.com
Discord:   / discord  

#messaging #architecture #softwarearchitecture