LogMemory vs DiskLog segmentMessage position(offset)For broker, keeping message in memory makes gets and puts fast; but thememory are limited.When there is spike(producer sendmore messages), or message is toobigorconsumers gets slower. -> we need to drop the failed messages or store them somewhere else.If some of the messages are kept in memory, when it crashes or quit, messages are lost.RabbitMQ and ActiveMQ keep messages in both memory and disk, while Kafka store memory solely on disk.Log: (like a queue in memory): a file in the disk and append only; messages have id and append to the file.
...
继续阅读
(55)