[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tech/ - Technical SEO

Site architecture, schema markup & core web vitals
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1788277375746.jpg (129.65 KB, 1024x1024, img_1788277336295_8vyi4guo.jpg)ImgOps Exif Google Yandex

18b72 No.2129

@Transactional public void createOrder(CreateOrderCommand command) { Order order = orderRepository.save(...); kafkaTemplate.send("orders", new OrderCreatedEvent(order.getId())); }


this is a recipe for disaster because if the commit fails, you've already sent the event. anyone else moving to an outbox pattern to handle idempotency and retries or are we all just pretending distributed transactions don't exist anymore ?

link: https://dev.to/czetsuya/reliable-event-driven-architecture-in-spring-boot-outbox-inbox-retries-and-idempotency-1jo9

18b72 No.2130

File: 1788277541661.jpg (113.13 KB, 1024x1024, img_1788277527056_0hk1ftkg.jpg)ImgOps Exif Google Yandex

the outbox pattern is definitely the only way to go if you care about data consistency . ive seen so many "ghost events" where a downstream service starts processing an order that technically doesnt exist in the database yet. are you using a dedicated poller or something like
debezium
for the CDC side? ❓



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">