kfaka windows安装
1 官网下载 解压到D:\developTools\kfaka\kafka_2.10-0.9.0.0
2 windows cmd启动
新开cmd命令:cd /d D:\developTools\kfaka\kafka_2.10-0.9.0.0\bin\windows
cd /d D:\developTools\kfaka\kafka_2.10-0.8.2.1\bin\windows
zookeeper-server-start.bat ..\..\config\zookeeper.properties
新开cmd命令:cd /d D:\developTools\kfaka\kafka_2.10-0.9.0.0\bin\windows
cd /d D:\developTools\kfaka\kafka_2.10-0.8.2.1\bin\windows
kafka-server-start.bat ..\..\config\server.properties
3 下载源代码 建maven工程 引入 对应pom文件
把examples下demo运行即可
public Producer(String topic, Boolean isAsync)
{
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092;localhost:9093");
// props.put("metadata.broker.list", "localhost:9092;localhost:9093");
props.put("client.id", "DemoProducer");
props.put("key.serializer", "org.apache.kafka.common.serialization.IntegerSerializer");
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
producer = new KafkaProducer<Integer, String>(props);
this.topic = topic;
this.isAsync = isAsync;
}
4 伪分布式:拷贝server.properties,新建副本 server-1.properties,然后cmd启动 kafka-server-start.bat ..\..\config\server-1.properties
broker.id=1 不能超过reserved.broker.max.id:1000
broker.id=1 ############################# Socket Server Settings ############################# listeners=PLAINTEXT://:9093 # The port the socket server listens on
port=1
# A comma seperated list of directories under which to store log files
log.dirs=/tmp/kafka-logs-1
5 常用命令 http://blog.csdn.net/laputa73/article/details/48826167
新建topic kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 2 --topic zhumltopic
查看所有topic kafka-topics.bat --list --zookeeper localhost:2181
查看指定topic kafka-topics.bat --describe --zookeeper localhost:2181 --topic zhumltopic
删除指定topic kafka-topics.bat --delete --zookeeper localhost:2181 --topic zhumltopic 只是标记删除,不是真正删除
解决方法:server.properties 中添加 delete.topic.enable=true
问题见:http://stackoverflow.com/questions/23976670/when-how-does-a-topic-marked-for-deletion-get-finally-removed
kfaka windows安装的更多相关文章
- Mysql(windows)安装
h3 { color: rgb(255, 255, 255); background-color: rgb(30,144,255); padding: 3px; margin: 10px 0px } ...
- Windows 安装JRuby 生成 war 到 tomcat 运行
Windows安装JRuby Rails 直接下载 JRuby,不装 Ruby. http://jruby.org/download 该安装包可以配好环境变量 %JRUBY_HOME% 等 安装 bu ...
- windows安装rabbitmq
官网下载windows安装版本:http://www.rabbitmq.com/install-windows.html ,安装文件rabbitmq-server-3.6.5.exe 前提:安装erl ...
- windows 安装 mongodb
windows 安装 mongodb 下载 首先到官网下载合适的安装包,下载地址为 https://www.mongodb.com/download-center MongoDB for Window ...
- 2016 windows安装phing:安装成功
21:39 2016/7/212016 windows安装phing:安装成功注意:出现错误时就去更新pear:参见:http://www.cnblogs.com/pinnasky/archive/2 ...
- Windows安装和使用zookeeper
之前整理过一篇文章<zookeeper 分布式锁服务>,本文介绍的 Zookeeper 是以 3.4.5 这个稳定版本为基础,最新的版本可以通过官网 http://hadoop.apach ...
- windows 安装mysql 步骤
Windows 安装mysql 5.7.12教程 1.在官网下载mysql5.7.12.zip并解压 复制默认配置文件my-default.ini,并命名为my.ini 使用记事本打开,修改如下配置 ...
- DOCKER windows安装
DOCKER windows安装 1.下载程序包 2. 设置环境变量 3. 启动DOCKERT 4. 分析start.sh 5. 利用SSH工具管理 6. 下载镜像 6.1 下载地址 6.2 用FTP ...
- openssh for windows安装
openssh for windows安装 2009-11-22 22:43:58 分类: WINDOWS 本文转自:http://blog.chinaunix.net/uid-7541208-id ...
随机推荐
- EBImage - - 给图片增加字符
EBImage中文文档 英文版出处:http://www.bioconductor.org/packages/release/bioc/vignettes/EBImage/inst/doc/EBIma ...
- 527. Word Abbreviation
Given an array of n distinct non-empty strings, you need to generate minimal possible abbreviations ...
- Android新特性之CardView的简单使用
Android新特性之CardView的简单使用 我们学习下Android5.0的新增加的控件CardView.首先我们了解一下CardView的基本使用,然后结合RecycleView使用CardV ...
- Glide图片加载回调
1.方法一:设置图片中监听 使用的是SimpleTarget类,他继承自BaseTarget,需要重写onResourceReady方法,onResourceReady方法表示加载完成后的回调,下面列 ...
- (10)centos搭建web服务器 (Nginx+ django)
安装 python3 sudo yum install python34 安装uWSGI pip install uwsgi 安装 Nginx http://nginx.org/en/download ...
- loj #100. 矩阵乘法
题目描述 这是一道模板题. 分别给定 n×p n \times pn×p 和 p×m p \times mp×m 的两个矩阵 A AA 和 B BB,求 A×B A \times BA×B. 输入格式 ...
- ReentrantReadWriteLock读写锁
概述 ReentrantReadWriteLock是Lock的另一种实现方式,我们已经知道了ReentrantLock是一个排他锁,同一时间只允许一个线程访问,而ReentrantReadWrit ...
- UVA 11100 The Trip, 2007 水题一枚
题目链接:UVA - 11100 题意描述:n个旅行箱,形状相同,尺寸不同,尺寸小的可以放在尺寸大的旅行箱里.现在要求露在最外面的旅行箱的数量最少的同时满足一个旅行箱里放的旅行箱的数量最少.求出这样满 ...
- 各语言最原始数据库访问组件封装DBHelper
源码:https://github.com/easonjim/DBHelper bug提交:https://github.com/easonjim/DBHelper/issues 每个语言放在不同的分 ...
- Mac 奇淫巧技 哈哈
1. 设置别名 sudo vim ~/.bash_profile alias ll='ls -lhF' alias la='ls -hlAF' alias c='clear' alias rm='ls ...