ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. Para https://bytecode.news/posts/2026/03/kafka-offset-commit-with-spring-boot
  2. dreamreal Para: ++
  3. nevet Para now has karma of 1.
  4. dreamreal the kafka commit semantics are ... interesting, and how spring boot interacts with them can be unexpected
  5. dreamreal it treats the *read* as a transaction
  6. jreicher Why wouldn't it?
  7. jreicher It probably shouldn't be called a "read". It's a really a consume.
  8. dreamreal Well, it doesn't consume the content, it IS a read
  9. jreicher It does consume the content. The commit offset is committed back, so you don't re-consume the same message by mistake.
  10. dreamreal but treating the read as a transaction can have odd semantics because the transaction doesn't necessarily propagate unless you take steps
  11. dreamreal it only consumes the content from that client-id's perspective, though
  12. dreamreal so I'd say it's still a read
  13. jreicher I'm happy to use the word read, but the offset is how the "consume effect" is implemented.
  14. dreamreal terminology is a drag, yeah, I get that
  15. jreicher So because there's a mutation taking place, it needs to be a transaction.
  16. Para Kafka is built to synchronize on write acks, so that's one factor to consider as well. For the most part it doesn't matter much.
  17. Para One wild choice was using Zookeeper ephmeral nodes for consumer group topic offset tracking, although I think they got rid of that, as there's no zk dependency anymore.
  18. Para (or something similar, my brains a bit extra mushy right now)
  19. jreicher I never took the time to understand zookeeper, but yeah I think it's gone.
  20. Para graphy thing with awesome features and nanosecond-scale latency as long as the hardware doesn't suck or behave erradically.
  21. dreamreal zk isn't gone but you can deploy without it, I think
  22. Para It never survived the cloud that well, CPU steal basically was like a gutpunch to ZK and then it would get into split brain dance, among other issues :D
  23. Para Kafka was built in Linkedin's in-house data centers originally with all the hardware they wanted running on bare metal, so they obviously hadn't considered things like CPU steal initially.
  24. jreicher Whenever I see split brain I have visions of some developer somewhere thinking how easy it was to write that automatic failover function...
  25. Para As a thingy I do like the ideas of Zookeeper though. Hierarchical configuration management with clustering, synchronization, several persistence levels etc.
  26. Para Kinda like what Hashicorp's Consul would then do a bit later.
  27. deebo never knew kafka was from linkedin
  28. Para Yeh, pre-Microsoft
  29. Para Then forked to Confluent.
  30. dreamreal life is a highway, man
  31. dreamreal signs everywhere
  32. deebo tom cochrane time
  33. dreamreal It's a great song! And it's incredibly fun to play.