[ 
https://issues.apache.org/jira/browse/KAFKA-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445046#comment-13445046
 ] 

Jay Kreps commented on KAFKA-367:
---------------------------------

This looks good. The only issue is that the encoder and decoder are pluggable 
(you just give the class name). This makes hard coding a property as a variable 
in the config object for a particular serializer a little awkward. I think this 
is actually a general need for any kind of serializer not just strings, the 
serializer might need access to various URLs, or to a schema string or all 
kinds of other things. Since we want people to be able to make their own 
serializers without modifying any kafka code, this is not very good.

Currently we require a no-arg constructor for the serializer. What if, instead, 
we required a constructor that took a single argument, the java.util.Properties 
instance? This way you could write a custom serializer and pass any properties 
you liked to it without needing to modify any kafka code. Perhaps ideally we 
could look for either the Properties only constructor or the no-arg constructor 
preferring the properties one, allowing backwards compatibility with any 
encoders people have already. 
                
> StringEncoder/StringDecoder use platform default character set
> --------------------------------------------------------------
>
>                 Key: KAFKA-367
>                 URL: https://issues.apache.org/jira/browse/KAFKA-367
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Jay Kreps
>            Assignee: Eli Reisman
>              Labels: newbie
>         Attachments: KAFKA-367-1.patch, KAFKA-367-2.patch
>
>
> StringEncoder and StringDecoder take the platform default character set. This 
> is bad since the messages they produce are sent off that machine. We should
> -- add a new required argument to these that adds the character set and 
> default to UTF-8 rather than the machine setting
> -- add a commandline parameter for the console-* tools to let you specify the 
> correct encoding.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to