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. Oracle数据类型与.NET中的对应关系

    Oracle连接添加的引用不同,会存在数据类型不同以及其他一些差别,就工作中遇到的问题暂时总结下. 两种不同的添加引用语句: (1)System.Data.OracleClient; (2)Oracl ...

  2. java 实现websocket的三种方式

    Java中实现websocket常见有以下三种方式: 使用tomcat的websocket实现,需要tomcat 7.x,JEE7的支持. 使用spring的websocket,spring与webs ...

  3. taro 微信小程序原生作用域获取

    在 Taro 的页面和组件类中,this 指向的是 Taro页面或组件实例. 但是一般我们需要获取 Taro的页面和组件 所对应的 小程序原生页面和组件实例,这个时候我们可以通过 this.$scop ...

  4. 关于Quad PLL /CPLL参考时钟的选择

    关于Quad PLL /CPLL参考时钟的选择 1.参考时钟 2.channel PLL具体分析 CPLL端口描述 一张图说清了时钟为怎么被分成了north or south

  5. ArrayBlcokingQueue,LinkedBlockingQueue与Disruptor三种队列对比与分析

    一.基本介绍 ArrayBlcokingQueue,LinkedBlockingQueue是jdk中内置的阻塞队列,网上对它们的分析已经很多,主要有以下几点: 1.底层实现机制不同,ArrayBlco ...

  6. Cygwin使用3-修改Cygwin的默认启动路径

    原先启动Cygwin后,pwd显示: C:\Documents and Settings\Administrator@IBM-EBDC0EAC4B7 ~$ pwdC:\Documents and Se ...

  7. Action<T> Delegate

    来源:https://docs.microsoft.com/zh-cn/dotnet/api/system.action-1?view=netframework-4.7.2 Action<T&g ...

  8. C++进阶--不让编译器自动生成类函数

    //############################################################################ /* * 不让编译器自动生成类函数 * * ...

  9. bzoj5052: 繁忙的财政官

    求区间内相差最小的两个数的差 分sqrt(n)块,预处理两个数在块内,以及一个数在块内一个数在零散部分的情况,询问时归并排序处理两个数都在零散部分的情况,时间复杂度$O((n+q)\sqrt{n})$ ...

  10. uoj#272. 【清华集训2016】石家庄的工人阶级队伍比较坚强

    http://uoj.ac/problem/272 这题的式子形式是异或卷积的三进制推广,因此可以设计一个类似fwt的变换,这里需要一个三次单位根$w$,满足$w^3\%p==1$且$(1+w+w^2 ...