You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Benoy Antony (JIRA)" <ji...@apache.org> on 2015/03/23 20:21:52 UTC
[jira] [Updated] (KAFKA-2041) Add ability to specify a KeyClass for
KafkaLog4jAppender
[ https://issues.apache.org/jira/browse/KAFKA-2041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benoy Antony updated KAFKA-2041:
--------------------------------
Attachment: kafka-2041-001.patch
In the attached patch, a _Keyer_ trait is defined. This trait has a function which when given a value , returns the key.
The _KafkaLog4jAppender_ is modified to accept a log4j configuration for a KeyClass. which will be an implementation of _Keyer_. The _Keyer_ implementation is instantiated and will be used while appending a message.
> Add ability to specify a KeyClass for KafkaLog4jAppender
> --------------------------------------------------------
>
> Key: KAFKA-2041
> URL: https://issues.apache.org/jira/browse/KAFKA-2041
> Project: Kafka
> Issue Type: Improvement
> Components: producer
> Reporter: Benoy Antony
> Assignee: Jun Rao
> Attachments: kafka-2041-001.patch
>
>
> KafkaLog4jAppender is the Log4j Appender to publish messages to Kafka.
> Since there is no key or explicit partition number, the messages are sent to random partitions.
> In some cases, it is possible to derive a key from the message itself.
> So it may be beneficial to enable KafkaLog4jAppender to accept KeyClass which will provide a key for a given message.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)