![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
kafka
文章平均质量分 67
逆流者blog
不登高山,不知天之高也;不临深溪,不知地之厚也。
展开
-
Kafka Broker
1 Kafka Broker 工作流程1.1 Zookeeper 存储的 Kafka 信息[vagrant@localhost bin]$ ./zkCli.sh ....[zk: localhost:2181(CONNECTED) 1] ls /kafka[admin, brokers, cluster, config, consumers, controller, controller_epoch, feature, isr_change_notification, latest_produc原创 2022-03-27 13:48:37 · 2560 阅读 · 0 评论 -
Kafka 生产者
生产者消息发送流程发送原理在消息发送的过程中,涉及到了两个线程——main 线程和 Sender 线程。在 main 线程中创建了一个双端队列 RecordAccumulator。main 线程将消息发送给 RecordAccumulator,Sender 线程不断从 RecordAccumulator 中拉取消息发送到 Kafka Broker。batch.size:只有数据积累到batch.size之后,sender才会发送数据。默认16k ;linger.ms:如果数据迟迟未达到batch.原创 2022-03-13 17:03:24 · 2882 阅读 · 0 评论 -
Kafka 基础架构
Kafka 基础架构为方便扩展,并提高吞吐量,一个topic分为多个partition;配合分区的设计,提出消费者组的概念,组内每个消费者并行消费;为提高可用性,为每个partition增加若干副本,类似NameNode HA;ZK中记录谁是leader,Kafka2.8.0以后也可以配置不采用ZK;名词说明Producer:消息生产者,就是向 Kafka broker 发消息的客户端。Consumer:消息消费者,向 Kafka broker 取消息的客户端。Consumer Gr原创 2022-02-19 19:28:38 · 432 阅读 · 0 评论 -
kafka server.properties配置文件说明
完整配置文件:# Licensed to the Apache Software Foundation (ASF) under one or more# contributor license agreements. See the NOTICE file distributed with# this work for additional information regarding copyright ownership.# The ASF licenses this file to You u原创 2022-02-19 18:40:44 · 1613 阅读 · 0 评论 -
Kafka 命令行操作
kafka-topics.sh 脚本使用参数列表:[vagrant@localhost kafka_2.12-3.0.0]$ bin/kafka-topics.shCreate, delete, describe, or change a topic.Option Description ------ -----原创 2022-02-19 18:22:30 · 1795 阅读 · 0 评论 -
Kafka集群安装
上传安装包 kafka_2.12-3.0.0.tgz 到服务器[vagrant@localhost ~]$ lltotal 276772drwxrwxr-x. 8 vagrant vagrant 158 Jan 2 15:24 apache-zookeeper-3.5.7-bin-rw-rw-r--. 1 vagrant vagrant 9311744 Jan 2 14:56 apache-zookeeper-3.5.7-bin.tar.gzdrwxrwxr-x. 8 vagr原创 2022-02-19 12:27:13 · 1072 阅读 · 0 评论 -
kafka 安装和启动
下载kafka: https://archive.apache.org/dist/kafka/2.8.1/kafka_2.13-2.8.1.tgztar -xzf kafka_2.13-2.8.1.tgzcd /Users/wushanghui/Downloads/kafka_2.13-2.8.1# Start the ZooKeeper service# Note: Soon, ZooKeeper will no longer be required by Apache Kafka.$ bin原创 2021-11-06 15:53:44 · 2459 阅读 · 0 评论