News for hackers. Stuff that matters.
Re:Why Was Apache Kafka Created? by SJC_Hacker on Monday August 25, 2025 @06:20PM (#45019823)
Out of curiousity what was the issue with just wrapping the AMQP-CPP pub/sub calls around a mutex?
Re:Why Was Apache Kafka Created? by HarHarVeryFunny on Tuesday August 26, 2025 @09:01PM (#45034244)
I'm a bit hazy on the full details because it was a few years ago, but basically it gets more complicated because you subscribe by installing an async callback which needs to ack/nak messages, needing locking, and will be called from the context of the network event loop that also needs locking. If you do any real work in the message processing callback then you'll be blocking the event loop, so the callback has to defer processing by queuing C++ lambdas capturing the context, and running those in a thread pool.