Grokking Kafka and Event-Driven Architecture
Vote

0% completed

​

The Outbox on Kafka

A subscription service renews about 30,000 subscriptions on the first day of every month. Each renewal must save an invoice in the billing database and publish SubscriptionRenewed, so that the receipt sender and the revenue ledger can act on it. Here is the first version of the renewal code:

update("UPDATE subscriptions SET paid_until = ? WHERE id = ?", "05-31", subscriptionId); update("INSERT INTO invoices VALUES (?, ?, 1800)", invoiceId, subscriptionId); db.commit(); // ... producer.send(new ProducerRecord<>(TOPIC, subscriptionId, "SubscriptionRenewed " + invoiceId)).get();

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content