<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg" -->

---
title: Top 10 Event-Driven Architecture Pitfalls by Victor...
description: A conference talk from Spring I/O 2026 walks through the top pitfalls teams hit when adopting event-driven architecture with message brokers like Kafka. It...
canonical: https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Top 10 Event-Driven Architecture Pitfalls by Victor Rentea @ Spring I/O 2026 | daily.dev
og:description: A conference talk from Spring I/O 2026 walks through the top pitfalls teams hit when adopting event-driven architecture with message brokers like Kafka. It...
og:url: https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg
og:image: https://api.daily.dev/og/posts/gx7KqWFZG.png
og:image:alt: Top 10 Event-Driven Architecture Pitfalls by Victor Rentea @ Spring I/O 2026
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Top 10 Event-Driven Architecture Pitfalls by Victor Rentea @ Spring I/O 2026

**[Spring I/O](https://daily.dev/sources/springio)** · 47 min read · 0 upvotes · 0 comments

## Summary

A conference talk from Spring I/O 2026 walks through the top pitfalls teams hit when adopting event-driven architecture with message brokers like Kafka. It covers stolen messages from shared consumer groups, race conditions and lost updates without optimistic/pessimistic locking, message ordering problems solved via partitioning (and their downsides like hot partitions and cross-topic ordering), testing challenges with Spring Boot's context caching and async listeners, producer-consumer callback timing issues, the dual-write problem solved via outbox pattern with Debezium/CDC, idempotency for duplicate messages, event vs command naming, and poison pill messages that crash consumers repeatedly. Delivered in a high-energy, humor-heavy style with frequent asides about AI coding tools.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=blPlsapt7p4>

## Questions this post answers

### How do I prevent lost updates when multiple Kafka consumers process messages for the same entity concurrently?

Use optimistic locking by adding a version column to the row; when a consumer reads a row it captures the version, and on write it checks the version still matches. A mismatch triggers an optimistic locking exception, which causes the broker to redeliver the message so it can be reprocessed correctly. This avoids the contention and deadlock risk of pessimistic locking (SQL SELECT FOR UPDATE).

_Developers hardening concurrent Kafka consumers can find more concurrency patterns curated on daily.dev._

### Why would two Kafka messages for the same entity get processed out of order even with a single partition consumer?

Consumers fetch messages in batches rather than one at a time, so if a thread processing an earlier batch is still working while another thread grabs a later batch, the later message can finish first. Partitioning by a message key (like a customer ID) ensures a single thread handles all messages for that key sequentially, eliminating this overlap within one partition.

_Anyone debugging out-of-order event processing can track partitioning strategies and gotchas on daily.dev._

### How do I avoid the dual-write problem when saving to a database and publishing a Kafka message in the same operation?

Save the message to an outbox table in the same database transaction as the business data change, then use change data capture (CDC) tooling like Debezium to read the outbox table and publish messages to the broker asynchronously. This guarantees the save and the message send are atomic without relying on distributed transactions or two-phase commit, which don't fit typical microservice setups.

_Teams wiring up outbox and CDC pipelines can keep up with Debezium and Kafka patterns via daily.dev._

## Similar posts on daily.dev

- [5 Event Driven Architecture Problems \(And How to Avoid Them\)](https://daily.dev/posts/5-event-driven-architecture-problems-and-how-to-avoid-them--op9v6ng45) · CodeOpinion · 132 upvotes · 6 comments
- [Scaling Java-Based Real-Time Systems: The Hidden Tradeoffs of Event-Driven Design](https://daily.dev/posts/scaling-java-based-real-time-systems-the-hidden-tradeoffs-of-event-driven-design-ef85inlwt) · InfoQ · 8 upvotes · 1 comments
- [Developing Real-Time Event Processing With Micronaut and Kafka Streams: A Step-by-Step Guide](https://daily.dev/posts/developing-real-time-event-processing-with-micronaut-and-kafka-streams-a-step-by-step-guide-ngulbl70j) · DevOps.com · 0 upvotes · 0 comments
- [Event-Driven Architecture with Spring Boot and AWS EventBridge: Escaping the Distributed Monolith](https://daily.dev/posts/event-driven-architecture-with-spring-boot-and-aws-eventbridge-escaping-the-distributed-monolith-vut2syvqf) · Sergio Lema · 49 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#architecture](https://daily.dev/tags/architecture), [#distributed-systems](https://daily.dev/tags/distributed-systems), [#kafka](https://daily.dev/tags/kafka), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Top 10 Event-Driven Architecture Pitfalls by Victor Rentea @ Spring I/O 2026","url":"https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg"},"datePublished":"2026-09-27T07:26:34.990Z","dateModified":"2026-09-27T07:53:09.612Z","description":"A conference talk from Spring I/O 2026 walks through the top pitfalls teams hit when adopting event-driven architecture with message brokers like Kafka. It...","image":"https://i.ytimg.com/vi/blPlsapt7p4/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/blPlsapt7p4/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Spring I/O","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Spring I/O","logo":"https://media.daily.dev/image/upload/s--e-TcwM9B--/f_auto,q_auto/v1790493985/logos/springio?_a=BAMAMicg0","url":"https://daily.dev/sources/springio"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,architecture,distributed-systems,kafka,spring-boot","timeRequired":"PT47M","video":{"@type":"VideoObject","name":"Top 10 Event-Driven Architecture Pitfalls by Victor Rentea @ Spring I/O 2026","description":"A conference talk from Spring I/O 2026 walks through the top pitfalls teams hit when adopting event-driven architecture with message brokers like Kafka. It...","thumbnailUrl":"https://i.ytimg.com/vi/blPlsapt7p4/sddefault.jpg","uploadDate":"2026-09-27T07:26:34.990Z","duration":"PT47M","url":"https://api.daily.dev/r/gx7KqWFZG","embedUrl":"https://www.youtube.com/embed/blPlsapt7p4"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Spring I/O","item":"https://daily.dev/sources/springio"},{"@type":"ListItem","position":3,"name":"Top 10 Event-Driven Architecture Pitfalls by Victor Rentea @ Spring I/O 2026"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/top-10-event-driven-architecture-pitfalls-by-victor-rentea-spring-i-o-2026-gx7kqwfzg#faq","mainEntity":[{"@type":"Question","name":"How do I prevent lost updates when multiple Kafka consumers process messages for the same entity concurrently?","acceptedAnswer":{"@type":"Answer","text":"Use optimistic locking by adding a version column to the row; when a consumer reads a row it captures the version, and on write it checks the version still matches. A mismatch triggers an optimistic locking exception, which causes the broker to redeliver the message so it can be reprocessed correctly. This avoids the contention and deadlock risk of pessimistic locking (SQL SELECT FOR UPDATE). Developers hardening concurrent Kafka consumers can find more concurrency patterns curated on daily.dev."}},{"@type":"Question","name":"Why would two Kafka messages for the same entity get processed out of order even with a single partition consumer?","acceptedAnswer":{"@type":"Answer","text":"Consumers fetch messages in batches rather than one at a time, so if a thread processing an earlier batch is still working while another thread grabs a later batch, the later message can finish first. Partitioning by a message key (like a customer ID) ensures a single thread handles all messages for that key sequentially, eliminating this overlap within one partition. Anyone debugging out-of-order event processing can track partitioning strategies and gotchas on daily.dev."}},{"@type":"Question","name":"How do I avoid the dual-write problem when saving to a database and publishing a Kafka message in the same operation?","acceptedAnswer":{"@type":"Answer","text":"Save the message to an outbox table in the same database transaction as the business data change, then use change data capture (CDC) tooling like Debezium to read the outbox table and publish messages to the broker asynchronously. This guarantees the save and the message send are atomic without relying on distributed transactions or two-phase commit, which don't fit typical microservice setups. Teams wiring up outbox and CDC pipelines can keep up with Debezium and Kafka patterns via daily.dev."}}]}
```

