-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base64 encoded message error: Error while decoding packet: Unexpected messageFormat #723
Comments
"Unexpected messageFormat" is not an error that sarama returns, are you sure it's not coming from some other code? |
The consumer code is straight from https://godoc.org/github.com/Shopify/sarama#Consumer - seems to work fine if I pass a base64 encoded string such as "Hello World" but for images, I get the error message. The only other reference of the error is in this other Sarama issue #635 |
Oh. You're not actually using sarama master then, that error was removed a month ago. |
I cloned the repo last week and could see the same behavior in kafka-console-consumer under the tools folder of sarama. So, if I run
the string shows up in sarama kafka-console-consumer and the kafka-console-consume in kafka/bin folder. However, if I pass in a (much) longer base64 encoded string of a jpeg file, for example, the sarama kafka-console-consumer does not echo (crashes?) the string whereas the kafka-console-consumer from kafka/bin works. Not sure if I am missing something obvious. |
Can confirm that my simple pub/sub test is working with Kafka v0.8.2.2 but not with v0.10.0 |
That error message was literally removed in a PR that was merged on June 20th: https://github.com/Shopify/sarama/pull/681/files#diff-b95c50d14ed7b4bb1cfecdc4e498d4dcL97. That string no longer exists in the code base at all. That PR added support for consuming from Kafka v0.10 so if you're using code from before that, I wouldn't expect it to work. |
Versions
Sarama Version: master
Kafka Version: 0.10.0
Go Version: 1.6.2
Problem Description
I have the following payload struct:
where Content contains a base64 encoding of an image. The payload can be published successfully via a producer and I can validate using the Kafka console consumer.
However, when I try to consume the payload following the consumer in Sarama Godoc:
I get the following error on the console: kafka: Error while decoding packet: Unexpected messageFormat
I am not using any compression in the producer. Is there a recommendation what I might be doing wrong?
The text was updated successfully, but these errors were encountered: