Karaf 实践指南 Kafka 安装 Karaf 学习 Kafka 帮助

本文档记录了在一个机器上搭建Kafka集群的过程,包括下载安装Kafka、启动单节点Zookeeper、配置并启动3个broker节点的集群,以及创建、查看topic,测试Producer和Consumer的正常及异常情况。
摘要由CSDN通过智能技术生成

公司很多产品有在使用Kafka进行数据的处理,因为各种原因,没有在产品中有用到这快,偶尔,自己去研究下,做个文档进行记录:
本文是在一个机器上进行的kafka集群,分为三个节点,并且测试peoducer、cunsumer在正常和非正常情况下的测试:

1. 下载和安装Kafka

    > mkdir kafka
    > cd kafka
    > wget https://archive.apache.org/dist/kafka/0.8.0/kafka_2.8.0-0.8.0.tar.gz
    > tar -xzvf kafka_2.8.0-0.8.0.tar.gz
    Ok,Kafka安装完成,比较简单。

2. 启动单节点的zookeeper

    > $ nohup bin/zookeeper-server-start.sh config/zookeeper.properties &

3. 准备启动一个3个broker节点的kafka集群,因此做如下配置

    >cp config/server.properties config/server-1.properties 
    >cp config/server.properties config/server-2.properties
 修改下面的如下参数:
    server-
Book Description Develop and deploy applications using the OSGi-based runtime container, Apache Karaf Overview Understand Apache Karaf’s commands and control capabilities Gain familiarity with its provisioning features Explore various application deployments targets experientially In Detail Apache Karaf is more than just an OSGi-based runtime container; it’s an ecosystem of open source technologies that makes operating and managing applications easier. Karaf supports hot deployment of OSGi bundles by monitoring jar files inside the [home]/deploy directory. Each time a jar is copied in this folder, it will be installed inside the runtime. You can then update or delete it, and changes will be handled automatically. In addition, Karaf also supports exploded bundles and custom deployers. Learning Apache Karaf will introduce developers and administrators alike to the OSGi-based container, and impart best practices by example. The book shows you how to set up an Apache Karaf distribution, and how to arrive at a production-ready deployment. Learning Apache Karaf teaches you everything you need to install, configure, and administer Apache Karaf. Learning Apache Karaf will help guide you through the complexity of an OSGi container using sample code and configuration snippets to demonstrate the important aspects of managing and running a Karaf instance. Learning to install and command the runtime is just the beginning; deploying and provisioning applications is just as important to the successful implementation of a stable and scalable architecture. You will discover how to monitor runtime environments using remote access, logging, and JMX, and you will also develop production-level architectures with high availability and security. What you will learn from this book Command and control the runtime Explore system configuration tuning Delve into Karaf’s provisioning mechanisms Understand application deployment through practical examples Improve your Karaf deployment to product
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值