3 ms·
This is again assuming that you have no side effects. Imagine that you want to email users based on a list in Kafka. You read the offset in a transaction and up
by kevincox 4y ago
This is again assuming that you have no side effects. Imagine that you want to email users based on a list in Kafka. You read the offset in a transaction and update it. But do you send the email inside the transaction or after closing it? You are back to picking between at-least-once and at-most-once.
- taspeotis 4y agoJust put the offset in the email to users and make them keep track of it??
- bjornsing 4y agoYou got some good jokes as answers already, but what you do if you care about correctness is to store a “send email job” in your transactional data store.
- morelisp 4y agoWhat transactional data store capable of sending email do you recommend?
- bjornsing 4y agoJust about any transactional datastore will do. Just google for “job queue in [insert name of datastore here]”.
- morelisp 4y agoYou've missed the point: How do you tie sending email to the transactional semantics? Your email server and your SQL server (or whatever) make just as much of a distributed system as Kafka and the email server without some other store in the middle. If you want to solve it really, your email server itself needs to participate in the consensus process in some way.