GithubHelp home page GithubHelp logo

dukeann / gohangout-input-kafka_sarama Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 2.0 6 KB

https://github.com/childe/gohangout 项目的 kafka input 插件,替换了 kafka 消费者包

License: MIT License

Go 100.00%
kafka elasticsearch

gohangout-input-kafka_sarama's Introduction

简介

此包为 https://github.com/childe/gohangout 项目的 kafka inputs 插件。

特点

支持原有 inputs kafka 大部分参数,并添加了 kafka 版本支持

解决了 lz4 解压问题

不支持的参数有

consumer_settings 下的

  • TLS 全部
  • offsets.storage
  • connect.timeout.ms
  • timeout.ms.for.eachapi

使用方法

kafka_sarama_input.go 复制到 gohangout 主目录下面, 运行

go build -buildmode=plugin -o kafka_sarama_input.so kafka_sarama_input.go

kafka_sarama_input.so 路径作为 inputs

gohangout 配置示例

指定消费者个数

inputs:
    - '/path/go/kafka_sarama_input.so': 
          topoc:
            topicName: 5
          codec: json
          consumer_settings:
            bootstrap.servers: '127.0.0.1:8080'
            group.id: groupId
            client.id: csw134s
            auto.commit.interval.ms: '1000'
            auto.commit: 'true'
            version: '0.9.0.0'
outputs:
    - Stdout: {}

指定消费分区

每个分区一个消费者

inputs:
    - '/path/go/kafka_sarama_input.so': 
          assign:
            topicName: [1,3]:
          codec: json
          consumer_settings:
            bootstrap.servers: '127.0.0.1:8080'
            group.id: groupId
            client.id: csw134s
            auto.commit.interval.ms: '1000'
            auto.commit: 'true'
            version: '0.9.0.0'
outputs:
    - Stdout: {}

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.