Coder Social home page Coder Social logo

Comments (2)

bvenable avatar bvenable commented on August 18, 2024

UPDATE: fixed with the following code:

@codec.on_event do |event|
  begin
bytes = event.to_java_bytes
    @producer.sendMsg(@topic_id,nil,bytes)
  rescue LogStash::ShutdownSignal

I'll probably make a PR for this and my graylog2-kafka codec once I've done some testing and polishing. The codec just basically makes an array containing a hash of the event's string fields, a hash of the integer fields, an empty hash and a long integer timestamp (epoch + ms). This is to match the spec for the Graylog2 Kafka input.

Mainly I want to see if this will be less CPU intensive than sending messages in GELF, which I believe it will be. I also need to add threading to the logstash-kafka output to achieve what I'm looking for, though.

from jruby-kafka.

joekiller avatar joekiller commented on August 18, 2024

I haven't had a chance to review this but am glad you have a good direction. Pull requests are welcome. Regardless, thanks for the analysis as others are curious about using another encoder as well.

from jruby-kafka.

Related Issues (20)

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.