After reading a dozen articles, I still had questions.
That's why I created this manual.
Event Bus vs Message Queue vs Message Broker.
Event Bus
Designed for publishing events to many subscribers, Publish-Subscribe (Pub-Sub), One-to-many.
The publishers and subscribers don't need to know about each other. High level of decoupling!
Generally, the systems consume messages as they arrive instead of storing them.
Does not guarantee delivery.
When to use it:
- Real-time notifications across many subscribers
- Situations where many services need to react to specific events
Examples:
Inventory System: Notify other services when a product is out of stock.
Monitoring Systems: Alert other departments when the system exceeds a certain threshold.
Message Queue
Designed to hold messages until a consumer service can process them.
Use Point-to-Point or Producer-Consumer communication model. One-to-One.
The sender delivers the message and waits for an acknowledgment.
When to use it:
- Decoupling producer and consumer services
- Asynchronous processing of tasks
Examples:
Order Processing: Queue orders for one-by-one processing.
Data Ingestion: Collect data at high velocity and process it when possible.
Message Broker
A robust system that includes the features of both Event Bus and Message Queue. Pub-Sub and Point-to-Point.
Can be one-to-one, one-to-many, or many-to-many.
When to use it:
- Complex data routing scenarios.
- Many communication patterns within a single application.
- Transformation and aggregation of messages.
Examples:
Multi-service Orchestration: Coordinate tasks among various microservices using complex routing rules.
Have you used any of them? Share your war stories.
Life is too short to waste. If you are waking up every day and don't/can't celebrate your accomplishments, you are wasting your life with wrong people.
A big difference between two type of software 'architects':
#1: Speaks the tech jargon. But *only* uses the jargon.
#2: Speaks the tech jargon. But *only* uses jargon when it's helpful - and they know the other party understands - else uses plain language to explain ideas.
@MemeingBitcoin @DocumentingBTC If you are buying a fixed amount of Bitcoin, then yeah, the difference is negligible. But if you are buying with a fixed amount of dollars, then it makes a big difference.
I just put all my technical threads in one big PDF. It has 75 topics and 158 pages!
Here are some sample topics:
🔹 Why is Redis fast?
🔹 Design Google Maps
🔹 How does HTTPs work?
The PDF Link is in the first post of my newsletter: https://t.co/PczMAd8Jdb
Hope it's helpful.
The "Software Engineering at Google" book is now free to read online: https://t.co/cqX79uZNFK. Great insights on improving code quality & scaling engineering teams.