Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Might add a note, but I don't want to muddy the waters. Technically, neither is the Redis Streams implementation. But they both quack like a queue, and are meant to be used like a queue, so will probably talk about implementation details in a deep dive of some sort.

EventBridge isn't a queue either, actually.



> But they both quack like a queue, and are meant to be used like a queue

Not necessarily. Nothing stops one from using Kafka topic in a fashion similar to a queue but even then, the way this would have been done differs significantly.

Very simplified: in a queue, an available message is picked up by a consumer and must be acked / nacked within a certain period of time. If message is acked, it is considered processed and may be chosen to be removed, depending on the queue semantics. If nacked, it becomes available for reprocessing. Multiple consumers may be processing messages at completely different offsets and a failure of processing at an early offset does not prevent other consumers advancing the queue.

In a commit log, if the consumer is not able to process the message, it has to keep retrying that one message until it can be processed OR ignore failure and publish the message back to the log at a new offset for future reprocessing. Regardless of that, any other consumer (or group) has its own view of the world so two consumers (or consumer groups) will process all messages from the topic.

The semantics are completely different.


True enough. Will think about whether it makes sense to add a section on stream processing, or maybe do a different post. It's an interesting complement to message queues. There's also Kinesis in this space, will look out for others.


Added a note about the consumer groups, and how each consumer group behaves like a queue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: