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

Support for 0 length messages- kafka limitation or librdkafka? #60

Closed
winbatch opened this issue Jan 14, 2014 · 8 comments
Closed

Support for 0 length messages- kafka limitation or librdkafka? #60

winbatch opened this issue Jan 14, 2014 · 8 comments

Comments

@winbatch
Copy link

There are cases where I want to send only the partition key but an empty payload. This gets rejected- is this a librdkafka limitation or a librdkafka enforcement of a kafka rule?

@edenhill
Copy link
Contributor

Its an assert in librdkafka, but I dont think this is a kafka rule.
I will check if Kafka supports it and then remove the librdkafka limitation for it if so.
I'll get back to you.

@winbatch
Copy link
Author

I guess 0 is ok? We should check that compression doesn't fail ;)

On Wednesday, January 15, 2014, Magnus Edenhill wrote:

Closed #60 #60.


Reply to this email directly or view it on GitHubhttps://github.com//issues/60
.

@edenhill
Copy link
Contributor

payload length 0 is now okay, and yes, compression works for these empty messages :)

@winbatch
Copy link
Author

I was surprised to get this in my callback. I'd zero is ok, it shoukdnt complain or at least should just be shown with debugging on.
16-Jan-2014 09:57:33:214 [T03][13156] kafka/kafka.cc:49 [TEST] fac:'GZIP' name:'LARA_replicator#producer-0' log:'emsdc136235-001.masked.com:9092/0: Failed to gzip-compress0 bytes for topic danP3R3 [2]: buffer error (1): sending uncompressed'

@winbatch
Copy link
Author

Note I don't get this callback with snappy

@winbatch
Copy link
Author

Looks like the rdkafka_example cannot handle an empty message. I tried a java consumer and it's fine.

@winbatch
Copy link
Author

Never mind, mistake at my end

@edenhill
Copy link
Contributor

The gzip warning is now gone.
Thanks!

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