Giter Club home page Giter Club logo

kafka's Introduction

Kafka

由于Kafka依赖于ZooKeeper服务, 因此在启动Kafka服务之前我们必须先启动ZooKeeper服务

Kafka是一个分布式的、可分区的、可复制的消息系统. 除了提供普通消息系统的功能之外, Kafka的设计特点有:

  • Kafka将消息以topic为单位进行归纳
  • 将向Kafka topic发布消息的程序称为producers
  • 将预定topics并消费消息的程序称为consumer
  • Kafka以集群的方式运行, 可以由一个或多个服务组成, 每个服务叫做一个broker.
  • producers通过网络将消息发送到Kafka集群, 集群向消费者提供消息.
  • SSL认证模式, 暂时弃用
  • SASL认证模式

杂谈

部署时发现的问题

  • kafka server.properties 中的log.dirs配置采用默认配置时, 在重启虚拟机的情况下会导致.log文件 被重写从而导致topic数据丢失
    • 问题发现:
    # 找到topic key数据存放的.log文件导出发现数据是存在的, .log文件大小也不为0. 重启后数据丢失
    sudo ./kafka-run-class.sh kafka.tools.DumpLogSegments --files /tmp/kafka/kafka-logs-0/test-2/00000000000000000000.log --print-data-log > 000000.txt
    • 解决方案: 将log.dirs改为自定义目录

kafka's People

Contributors

shanwenhao avatar shanwenhao1 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.