Giter Club home page Giter Club logo

Comments (4)

vmaurin avatar vmaurin commented on May 25, 2024

Does by any chance the topic contain existing messages, produced by an other producer ? The consumer auto reset to "earliest" so it will consume the topic from the beginning, and in Kafka, the broker sends messages as they are stored, as they want to delegate most of the CPU work to the clients. So you could face :

  • you have/had a producer producing snappy messages to the topic
  • the consumer fetch these messages, the metadata says "this message is a snappy one" and you don't have the appropriate library to decode it

from aiokafka.

whwright avatar whwright commented on May 25, 2024

Does by any chance the topic contain existing messages, produced by an other producer ?

No this is not possible, I am running this example on a brand new topic where my event in the script is the first and only one published.

from aiokafka.

vmaurin avatar vmaurin commented on May 25, 2024

Do you have access to the segment files on the broker ? If yes, you can check the compression with a kafka tools provided in the kafka binaries. Maybe there are 3rd party tools also offer that while consuming a topic.
In aiokafka, it seems the error you have should happen when reading messages with header compression saying "snappy" :

  • it doesn't seem to come from your input topic (but I would rather double check it, maybe something you are not aware added messages over there)
  • it maybe could have come from the __consumer_offsets topic, but you are not using any consumer group here

from aiokafka.

whwright avatar whwright commented on May 25, 2024

I found out that the topic I was creating was being created with compression.type: "snappy" without me providing that config to the API call. I am using a shared cluster, so I suspect that is the cluster's default in some way.

I re-creating my topic using compression.type: "producer" and my example above now works.

Thank you for your help, sorry it ended up being a dumb mistake!

from aiokafka.

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.