3 ms·
This is great, thank you. I do keep hearing about Kafta but I’m still mulling over what is in a message queue vs a db with similar state. For example a email qu
by evanmoran 3y ago
This is great, thank you. I do keep hearing about Kafta but I’m still mulling over what is in a message queue vs a db with similar state. For example a email queue could add an item for every email to send out. Is that clearer than an email table that queries for missing items and deletes the records when sent?
- byoung2 3y agoI think the benefit is that the services don't have to communicate directly with each other. So you have a user's cart that needs tax and shipping calculated. So you add a message to the queue, and one of the hundreds of nodes in the shipping cluster grabs the message and processes it. In your example, a database storing outgoing messages could be a single point of failure or performance bottleneck. But a distributed message queue would be more fault tolerant. You could have hundreds of sending nodes reading from the outgoing mail queue and sending out emails.