kafka drip

The purpose of ~Kafka is to become a queue platform, and just using it can support both offline and online use.

The ~consumer group is the smallest unit for receiving messages, that is, the messages consumed by the consumer group are only received by one of the consumers.

~Each kafka queue has a number of partitions, each partition physically corresponds to a folder, named with the naming method of "topicName_partitionIndex", and this folder stores all messages (.log) and index files (.index) of this partition ), which allows Kafka's throughput to scale horizontally.

~A message of the same topic can only be consumed by one Consumer in the same Consumer Group, but all Consumer Groups listening to this topic will consume this message. The consumer group also implements the features of other MQ queues and topics.

The producer of ~kafka is push, and the consumer is pull.

The push mode is difficult to adapt to consumers with different consumption rates, because the message sending rate is determined by the broker. The goal of the push mode is to deliver messages as quickly as possible, but this can easily cause the Consumer to be too late to process messages, typically resulting in denial of service and network congestion. In the pull mode, messages can be consumed at an appropriate rate according to the consumer's consumption capacity.

~ The number of partitions of a topic is specified at creation. When the consumer instance of a consumer group is not greater than the number of partitions, the messages consumed by each consumer are ordered. But messages consumed by consumers on different partitions are not guaranteed to be ordered.

 

 

 

http://blog.csdn.net/derekjiang/article/details/9053863/

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326487047&siteId=291194637