In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the principle and usage of Kakfa". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the principle and usage of Kakfa".
Kafka is a distributed, publish / subscribe based messaging system
1. Why the throughput of kafka queue is large
A. When producing messages, kafka is written sequentially to the hard disk.
B. Kafka data is not written to the hard disk in real time, but uses memory mapped file technology (mmap).
Kafka provides a parameter, producer.type, to control whether the active flush is synchronous and asynchronous.
C. When consumers consume messages, when they read data, they enter zero copy directly from the kernel space into the port in the form of files.
D, Kafaka message storage is based on partiton and can be extended horizontally.
2 、 kafaka Broker Server
Leader election
Prevent kafka from losing messages
1. The production end uses synchronous transmission and sets the required.acks attribute to-1 (master and slave confirm at the same time)
0: no confirmation, 1: master confirmation
2. Set message ID to ensure that messages are not duplicated.
3. The consumer sets the delivery attribute to at least one to consume at least once
Spend first and then confirm. Guarantee idempotency through business primary key
Thank you for your reading, the above is the content of "the principle and use of Kakfa". After the study of this article, I believe you have a deeper understanding of the principle and use of Kakfa, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.