Git Product home page Git Product logo

kafka-connect-es's Introduction

kafka-connect-es

KafkaConnect (CopyCat) for writing data to ElasticSearch. The ElasticSearchSinkTask can be configured with the following configuration.


es.cluster=127.0.0.1:9300
es.cluster.name=elasticsearch
index=person-index
type=person
bulk.size=1200
action.type=index
es.converter=org.apache.kafka.connect.es.converter.impl.KeyIgnoringJsonConverter

es.converter is a org.apache.kafka.connect.es.converter.Converter that needs to be configured. This will take a SinkRecord object and serialize it in to JSON bytes that can be written to ElasticSearch.

If the data in Kafka is already in JSON format and if you ignore Key (or Key is null in Kafka) then you can use the org.apache.kafka.connect.es.converter.impl.KeyIgnoringJsonConverter that is available with this library.

There is org.apache.kafka.connect.es.converter.impl.KeyValueUnionJsonConverter Converter available which will combine both Key & Value and both need to be JSON data in Kafka.

If you have any other format in Kafka (for example Avro), you would have to code a Converter to convert a SinkRecord to JSON format.

This Sink takes care of fault tolerance. Only when all the records are successfully committed in ElasticSearch, it instructs KafkaConnect to procceed and commit offsets.

kafka-connect-es's People

Contributors

ksenji avatar

Watchers

James Cloos avatar Vidhya Arvind 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.