Giter Site home page Giter Site logo

inloco / kafka-elasticsearch-injector Goto Github PK

View Code? Open in Web Editor NEW
75.0 18.0 15.0 823 KB

Golang app to read records from a set of kafka topics and write them to an elasticsearch cluster

License: MIT License

Makefile 1.90% Go 97.70% Dockerfile 0.40%
golang elasticsearch kafka data-stream-processing hacktoberfest

kafka-elasticsearch-injector's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kafka-elasticsearch-injector's Issues

Nil Map when unmarshalling Json

On function JsonMessageToRecord, the msg.Value may be a JSON literal null. In that case, according to Go's documentation:

Unmarshal first handles the case of the JSON being the JSON literal null. In that case, Unmarshal sets the pointer to nil

Given that, jsonValue will be a nil map and you cannot write any value to nil map.

It would be better to handle any errors before writing any values to the map and also to check if the map is not nil, as JSON literal null is a valid input.

Synchronous flush

KAFKA_CONSUMER_BATCH_SIZE controls when the in-memory events are flushed to ES.

However some topics may have small throughput, not having their events flushed at all.

It would be nice to have a second parameter controlling a recurrent tick so the in-memory events are flushed even when they do not meet the batch size requirement

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.