Hacker News new | ask | show | jobs
by superuser2 3711 days ago
You send a message (for example some JSON) to a Kafka topic. Any number of clients subscribe to that topic with a specific start time-stamp. Pluck a message off the queue, compute with it, send an acknowledgement. Kafka provides strong assurances that all readers get all the messages and report success (it retries otherwise), even if some participants come and go.

Very useful if, say, you have some real world event and dozens of different micro services need to do something about that event, independently.

You can also just use it for logging.

2 comments

This is a really inaccurate description. Messages aren't indexed by timestamp in any meaningful way; that feature is currently under development. Messages don't need to be acknowledged, it's the client's responsibility to track what messages have been consumed. The server provides some facilities to make that easier, but ultimately clients can request whatever messages they want (repeating, skipping, whatever), as long as the messages haven't expired out of retention.

If you're actually interested in Kafka, just read the documentation, it's quite good.

Interesting. Those are features my previous employer had and used extensively, in particular stateless clients. I guess we added those layers ourselves.
Sounds like a mailing list.
Yes, but for applications ; instead of doing a remote call to your other system to create an order or send an email, you just stick the data in a queue, and the other system does it when it feels like it
We do exactly that for our emails. We're not ultra high volume, but we send millions a day.