Giter VIP home page Giter VIP logo

kpax's Introduction

kpax: a modular & idiomatic Kafka client in Go

GoDoc

Install

go get -u h12.me/kpax

Design

The client is built on top of Kafka Wire Protocol (i.e. low-level API). The protocol related types & marshal/unmarshal functions are automatically generated by wipro from the HTML spec).

(-) means to be done.

Sub packages

  • model is an abstraction model for request, response, broker and cluster
  • broker is a lazy, asynchronous and recoverable round tripper that talks to a single Kafka broker
  • cluster is a metadata manager that talks to a Kafka cluster
  • proto contains both low level API and a "middle" level facade
  • producer: fault tolerant high-level producer (batching and partitioning strategy)
  • consumer: fault tolerant high-level consumer (consumer group and offset commit)
  • log: replaceable global logger
  • cmd
    • kpax: command line tool to help with Kafka programming

Compatibility

Compatible with Kafka Server 0.8.2.

Error Handling

  • broker
    • fail fast: timeout returns error immediately
    • release resources carefully
    • reconnect when requested next time
  • client
    • metadata reload lazily (only when a leader/coordinator cannot be found in cache)
    • leader/coordinator should be deleted on error
  • producer
    • fail over to another partition
    • failed partition will be retried again after a period of time
    • partition expand (-)
  • consumer
    • just loop & wait on error
    • partition expand (-)
  • graceful shutdown (-)

Efficiency

  • efficiency
    • batching
      • consumer response
      • consumer request (-)
      • producer (-)
    • decompression
      • snappy
      • gzip (-)
    • compression
      • snappy (-)
      • gzip (-)

Author

Hǎiliàng Wáng

Contributors

kpax's People

Contributors

cirias avatar

Watchers

 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.