-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Producer & Fetcher should provide serializes with topic name #836
Comments
I'm torn here. I think the simplicity of If we were to add this interface, I think we'd also want to add from java client:
Should we break the existing interface and require a more complicated starter config like |
All things aside.. I think the proper implementation would be to extend the requirement for Eg:
it would still be 1 serializer... and whether the implementer uses that topic information is up to them. |
Sorry -- yes, json is extremely slow. I typically would use Nonetheless, changing the existing configuration setting would break operations for most current users and I won't do that w/o a compelling reason. I think adding optional _class configurations is probably the least bad approach. |
could do with that. we're not extremely performance oriented - not yet at least. it's a great standard for wide-rage deployment though, so that's why we are looking into using it. |
how about this - if the idea of python-kafka is to be as close in implementation as possible to the Java reference, introduce two new class interfaces: there is "certain" amount of incentive if backwards compatibility was broken: producer/consumers are multi-topic capable, which means often - a different serializer could be used.. etc. It's a major fall-through from the original Java reference... |
I like that idea. Want to submit a PR? |
Serializers should be topic aware.
From java reference documentation:
The implementation in Python is missing this information.
KafkaPoducer._serialize
is called with topic name, but the topic is not propagated to the serializer.KafkaConsumer
callsFetcher
, whos_deserialize
api is missing topic informationThe text was updated successfully, but these errors were encountered: