Giter Club home page Giter Club logo

Comments (4)

mwhooker avatar mwhooker commented on May 31, 2024

also possible to reproduce in ClientIntegrationTestCase.test_fetch

list(self.kafka.fetch(topic, 0, 1, size))

from pykafka.

tkaemming avatar tkaemming commented on May 31, 2024

added more specific issue in #16 but i'll leave this open until that is resolved in case there is more going here

from pykafka.

tkaemming avatar tkaemming commented on May 31, 2024

ignore previous comment, #16 wasn't the issue

from pykafka.

tkaemming avatar tkaemming commented on May 31, 2024

figured out what's happening here: the issue is that the message size is equal to the header + payload, so the offset is not easily derived from the response from client.fetch, since it only responds with the message itself and the starting offset. it's further complicated by the fact that the header can either be 9 or 10 bytes based on format, and the deflated payload size will not equivalent to the compressed payload size for compressed messages. the sizes that the client is returning are correct, but not the most useful.

i'm starting to think it might be more helpful to return a message object (namedtuple?) with start offset, end offset and payload, as well as maybe some of the additional header metadata (checksum, etc). it might not be a bad idea to attach partition/topic information as well if we are going to be chaining streams from multiple partitions together in some cases also.

from pykafka.

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.