Giter Site home page Giter Site logo

Comments (9)

edenhill avatar edenhill commented on June 12, 2024

You are absolutely right, there are a couple of internal timeouts in librdkafka that are 1s.
To find the best solution I'd like to ask you what would an acceptable exit-delay be for you?

from kcat.

ibalashov avatar ibalashov commented on June 12, 2024

Thanks for confirming this!
Hm.. Anything less than 100ms would serve my needs, but can't this delay be dropped altogether?

from kcat.

edenhill avatar edenhill commented on June 12, 2024

This is now fixed in librdkafka commit confluentinc/librdkafka@8d9fdd2

$ time (echo "foo" | ./kafkacat -b 0 -P -t test -p 0)

real    0m0.052s
user    0m0.001s
sys 0m0.005s

Can you verify this on your end as well?

from kcat.

ibalashov avatar ibalashov commented on June 12, 2024

For some reason I still see the delay.
I tried rebuilding librdkafka and also getting one from https://github.com/edenhill/librdkafka/archive/master.tar.gz

Could it be something related to OS X?

from kcat.

edenhill avatar edenhill commented on June 12, 2024

Huhm, are you sure kafkacat is using the updated librdkafka?
Is it linked dynamically or statically?
Try checking out a fresh kafkacat and run ./bootstrap.sh

from kcat.

ibalashov avatar ibalashov commented on June 12, 2024

Just did a fresh checkout and ./boostrap.sh on a linux installation elsewhere and now it works correctly.

Strangely, doing the same on OS X has no effect. Could you possibly spot any issues in the build log? https://gist.github.com/ibalashov/c74f8cb9217db3099362#file-kafkacat_buildlog_osx-txt

from kcat.

edenhill avatar edenhill commented on June 12, 2024

Ah, SIGIO is ignored by default on OSX, but not Linux.
That's easily fixable.

But I'm not sure this is the right solution, a library typically shouldn't trigger signals and install signal handlers without the application's knowledge. Will have to think about it a bit more.

Is this stopping your development/deployment?

from kcat.

ibalashov avatar ibalashov commented on June 12, 2024

Glad to hear at least the cause is clear.
No worries, I needed this mainly for tests, and now I can run kafkacat from inside Linux VM if/when needed.
Thanks!

from kcat.

edenhill avatar edenhill commented on June 12, 2024

I've made a better fix for this now (opt-in on the application side, kafkacat opts in) which should also work better on OSX.

from kcat.

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.