Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consuming messages causes json.decoder.JSONDecodeError #36

Open
Glutexo opened this issue Aug 28, 2018 · 1 comment
Open

Consuming messages causes json.decoder.JSONDecodeError #36

Glutexo opened this issue Aug 28, 2018 · 1 comment

Comments

@Glutexo
Copy link

Glutexo commented Aug 28, 2018

When consuming a message set from Kafka, a JSONDecodeError is raised. This is caused by decoding a message with offset -1 and value '' (empty string), which is not valid JSON. Whenever a message is consumed by BaseConsumer, after successfully processing the actual message, another invalid one appears in the message set.

I created a gist with a minimal Tornado app. It connects to a single Kafka topic, reads a JSON message from stdin, produces it to Kafka and consumes it from there. Every time the consuming tries to parse two messages: first the one produced, which succeeds, and second some ghost-message with negative offset and empty value.

I am running with following versions:

@theoren
Copy link

theoren commented Mar 21, 2024

Suggested workaround fix - see fork https://github.com/theoren/kiel/commits/master/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants