I. Installation

The installation environment must have JDK, verify that you enter:

java -version

1. down

Install server-side versions based on the jar downloaded by maven, such as my "C:\Users\xiaobin\.m2\repository\org\apache\kafka\kafka_2.11\1.0.2"

kafka_2.11-1.0.2

2. unzip

$-.tgz

II. Configuration

server.properties

1. Necessary settings

1) basic

(1) listener

listeners=PLAINTEXT://your_IP:9092

(2) logs

$mkdir HOME/kafka_2.11-1.0.2/logs

2) cluster

Sets the natural number of the broker ID to non-zero.

Host1:

broker.id=1

Host2:

broker.id=2

Host3:

broker.id=3

2. Optional settings

1) Zookeeper

default

## Zookeeper ##
zookeeper.connect: The ZooKeeper address (can list multiple addresses comma-separated for the ZooKeeper cluster).

zookeeper.connection.timeout.ms: Time to wait before going down if, for some reason, the broker is not able to connect.

2) Socket Server Settings

default

## Socket Server Settings ##
socket.send.buffer.bytes: The send buffer used by the socket server.

socket.receive.buffer.bytes: The socket server receives a buffer for network requests.

socket.request.max.bytes: The maximum request size the server will allow. This prevents the server from running out of memory.

3) Log Flush Policy

default

## Log Flush Policy ##
log.flush.interval.messages: Threshold for message count that is once reached all messages are flushed to the disk.

log.flush.interval.ms: Periodic time interval after which all messages will be flushed into the disk.

4) Log Retention Policy

default

## Log Retention Policy ##

log.retention.hours: The minimum age of the segment file to be eligible for deletion due to age.

log.retention.bytes: A size-based retention policy for logs. Segments are pruned from the log unless the remaining segments drop below log.retention.bytes.

log.segment.bytes: Size of the segment after which a new segment will be created.

log.retention.check.interval.ms: Periodic time interval after which log segments are checked for deletion as per the retention policy. If both retention policies are set, then segments are deleted when either criterion is met.

III. Run

1. start

./bin/kafka-server-start.sh config/server.properties

2. stop

./bin/kafka-server-stop.sh

Reference:

1. How to Set Up Kafka

2. How to Setup Kafka Cluster

Install and Configure Apache Kafka的更多相关文章

  1. Install and Configure Apache Kafka on Ubuntu 16.04

    https://devops.profitbricks.com/tutorials/install-and-configure-apache-kafka-on-ubuntu-1604-1/ by hi ...

  2. How To Install Apache Kafka on Ubuntu 14.04

    打算学习kafka ,接触一些新的知识.加油!!! 参考:https://www.digitalocean.com/community/tutorials/how-to-install-apache- ...

  3. Spring for Apache Kafka

    官方文档详见:http://docs.spring.io/spring-kafka/docs/1.0.2.RELEASE/reference/htmlsingle/ Authors Gary Russ ...

  4. Configuring Apache Kafka Security

    This topic describes additional steps you can take to ensure the safety and integrity of your data s ...

  5. 《Apache kafka实战》读书笔记-kafka集群监控工具

    <Apache kafka实战>读书笔记-kafka集群监控工具 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 如官网所述,Kafka使用基于yammer metric ...

  6. 实践部署与使用apache kafka框架技术博文资料汇总

    前一篇Kafka框架设计来自英文原文(Kafka Architecture Design)的翻译及整理文章,非常有借鉴性,本文是从一个企业使用Kafka框架的角度来记录及整理的Kafka框架的技术资料 ...

  7. Understanding, Operating and Monitoring Apache Kafka

    Apache Kafka is an attractive service because it's conceptually simple and powerful. It's easy to un ...

  8. Apache Kafka - Quick Start on Windows

    在这篇文章中,我将要介绍如何搭建和使用Apache Kafka在windows环境.在开始之前,简要介绍一下Kafka,然后再进行实践. Apache Kafka Kafka是分布式的发布-订阅消息的 ...

  9. How to Install and Configure Nginx from Source on centos--转

    1.CentOS - Installing Nginx from source http://articles.slicehost.com/2009/2/2/centos-installing-ngi ...

随机推荐

  1. C 语言中的 switch 语句 case 后面是否需要加大括号

    事件原由为编辑器的自动缩进,当 case 换行后不自动缩进. 于是在在想可以可否在 case 后面再大括号,让其自动缩进. 查了资料,发现 case 是可以加大括号的,相当于代码块. 而且还有另外一个 ...

  2. js 去除字符串第一位逗号的方法

    <script type="text/javascript"> var s=',123456'; if (s.substr(0,1)==',') s=s.substr( ...

  3. php获取指定文件夹中文件名称

    /** * php获取指定文件夹中文件名称 * @author jackie <2018.10.10> */ public static function getFileName($fil ...

  4. jmeter --响应断言详解

    jmeter --响应断言详解 响应断言 :对服务器的响应进行断言校验 (1)应用范围: main sample and sub sample, main sample only , sub-samp ...

  5. VB Byte数组转字符串问题

    在c#中,byte转换为字符串的过程中,如果byte的值为0,则转换成字符串时变为’\0’字符,’\0’字符在C#中意味着字符串结束,如果后面再有字符,则读取字符串的程序也不能读取和显示出来. 但是在 ...

  6. Pyhanlp自然语言处理中的新词识别

    新词发现 本“新词发现”模块基于信息熵和互信息两种算法,可以在无语料的情况下提取一段长文本中的词语,并支持过滤掉系统中已存在的“旧词”,得到新词列表. 调用方法 静态方法 一句话静态调用接口已经封装到 ...

  7. MySQL体系架构

    MySQL体系架构 学习一门数据库系统首先得了解它的架构,明白它的架构原理对于后期的分析问题和性能调优都有很大的帮助,接下来就通过分析架构图来认识它. 数据库:物理操作系统文件或者其它文件的集合,在m ...

  8. oracle中delete、truncate、drop的区别

    oracle中delete.truncate.drop的区别 标签: deleteoracletable存储 2012-05-23 15:12 7674人阅读 评论(0) 收藏 举报  分类: ora ...

  9. webGL之three.js入门3--材料篇

    这几天在看李鹏程翻译的[美]Jos Dirksen的<Three.js开发指南>,看到第八章了,现在来总结一下threejs中材料的相关知识.顺带也看完了上海交大的张雯莉出的<thr ...

  10. 黄聪:windowss7显示桌面图标设置在任务栏的解决办法

    1.新建一个本文文档,将以下内容复制进去: [Shell] Command=2 IconFile=explorer.exe,3 [Taskbar] Command=ToggleDesktop 2.将该 ...