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. Python time & datetime模块

    time 模块 时间分为三种格式: 时间戳:表示1970年1月1日之后的秒 结构化时间:元组包含了:年.日.星期等... 格式化字符串:格式可以自定义 时间戳: import time time_st ...

  2. ElasticSearch(二) 关于DSL

    关于Lucene里面的查询评分,其实是基于一个公式:TF/ IDF(Term-Frequency/ Inverse Document Frequency),词频率/ 倒排文档频率,这个公式讲了一个故事 ...

  3. Jenkins进阶-部署Web项目到远程tomcat(7)

    之前讲到的是如何构建一个项目,并且将代码进行编译.打包,那么打包完成最后的结果就需要发布到应用服务器,将项目部署成功.在之前的项目中我们采用的shell脚本来部署,下面讲解通过Jenkins部署web ...

  4. Linux patch命令详解

    Linux patch命令 Linux patch命令用于修补文件. patch指令让用户利用设置修补文件的方式,修改,更新原始文件.倘若一次仅修改一个文件,可直接在指令列中下达指令依序执行.如果配合 ...

  5. 基于spring的placeholder思路处理配置信息敏感信息加密解密的实践

    基于Spring的placeholder处理思路,实现系统配置信息敏感信息的加密解密处理. 我们的处理方案,是基于类org.springframework.beans.factory.config.P ...

  6. CentOs6.7 python2.6升级到2.7.11

    1.查看当前python的版本 #python -V Python 2.6.6 2.下载Python-2.7.11 wget https://www.python.org/ftp/python/2.7 ...

  7. codeblocks “can't find compiler executable in yourconfigured search ……”

    新安装的codeblocks 16.01,安装后打开提示如下,没法用..原因是编译器并没有找对自己安装的 mingw 的安装位置. 解决办法:如下图点击 Auto-detect 之后,会看到位置信息变 ...

  8. node.js 学习的一个链接

    Node.js简介 点击查看 狼叔 的

  9. LeetCode——1. Two Sum

    一.题目链接:https://leetcode.com/articles/two-sum/ 二.题目大意: 给定一个int型数组A和int值a,要求从A中找到两个数,使得这两个数值的和为a:返回结果为 ...

  10. python 引用计数

    转载:NeilLee(有修改)   一.概述 要保持追踪内存中的对象,Python使用了引用计数这一简单的技术. sys.getrefcount(a)可以查看a对象的引用计数,但是比正常计数大1,因为 ...