开发者
编程技术、框架工具、最佳实践
共 6698 篇 · 第 55/335 页
Exactly-Once Semantics in Kafka: Promise vs. Reality
"We're using Kafka with exactly-once semantics, so we don't have to worry about duplicates." I've heard this in architecture reviews, design docs, and postmortem explanations. It represents a misunderstanding of what Kafka's exactly-once guarantee actually covers, and the gap between the promise and the reality has caused real production incidents. What Kafka's Exactly-Once Actually Covers Kafka's exactly-once semantics (EOS), introduced in 0.11.0, operates at two levels: Producer idempotence ( enable.idempotence=true ): The producer assigns each message a sequence number. The broker deduplicates messages with the same producer ID and sequence number. This prevents duplicates caused by producer retries — the message lands in the Kafka partition exactly once, regardless of retry count. Transactions ( transactional.id ): Allows a producer to write to multiple partitions atomically. Either all writes commit or none do. Combined with isolation.level=read_committed on consumers, readers only see committed transactions. Together, these give you exactly-once message delivery within the Kafka cluster. What Exactly-Once Does Not Cover Here's the boundary that engineers miss: Kafka's exactly-once guarantee is scoped to the Kafka cluster. The moment your consumer does anything outside Kafka — writes to a database, calls a REST API, publishes to a cloud queue — you're outside the transaction boundary. Consider a typical consumer: consumer . poll ( records ); for ( record : records ) { database . save ( process ( record )); // External write — outside Kafka transaction } consumer . commitSync (); If the application crashes after database.save() but before commitSync() , Kafka re-delivers the message. The consumer reprocesses it. The database now has two writes for the same event. Enabling producer idempotence on the consumer's Kafka writes does not fix this. The Patterns That Actually Give You End-to-End Safety Idempotent Consumers Design consumer processing logic to be idempote
Odin 2 Portal Exploded
The End of Creativity
DoD says soldiers over age 30 to be screened for testosterone deficiency
US Interconnection Queues by Region, State, and County
Intel Officials Predict the Pentagon’s Bill for the Iran War Will Exceed $100 Billion
The Trump administration has not disclosed its cost estimates for the Iran war.
The Rise of Grocery Tourism
GTX 1080s: Testing a Legend
Do data centers only seem bad for the climate because we can see them?
Ise Jingu and the Pyramid of Enabling Technologies (2021)
SQLite should have (Rust-style) editions
submitted by /u/mort96 [link] [留言]
pointer-events
The pointer-events property controls whether an element can become the target of pointer events like clicks, hover states, and other pointer-based events. In other words, it lets you decide whether the browser should treat an element as interactive when the … pointer-events originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
Voxatron
"Autism Is a Spectrum" Doesn't Mean What You Think (2019)
Duskers, the scary command line game, is getting a sequel
Making 768 servers look like 1
I Left Google DeepMind
More people around the world now favour China over the US, Pew study suggests
Apple quietly hid a big change coming for CarPlay with iOS 27
Apple announced the new CarPlay feature not long after Google announced a similar update for Android Auto.