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

Benoy Antony commented on KAFKA-2077:
-------------------------------------

Use case is as below :

We are using a system and we do not control its source code. The system has a 
Log4j logger which logs messages. Some of the messages has "username" as key 
and some of the messages has "ip address" as key.  We like to publish these two 
types of messages to different topics so that they can be partitioned on 
different keys. 

An alternate approach is to associate 2 Log4j appenders. Then attach a Log4j 
filter to each appender. The filter drops one of the message types.  Each 
appender publishes to a single topic.  I found it to be slightly more complex 
and slower.

> Add ability to specify a TopicPicker class for KafkaLog4jApender
> ----------------------------------------------------------------
>
>                 Key: KAFKA-2077
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2077
>             Project: Kafka
>          Issue Type: Improvement
>          Components: producer 
>            Reporter: Benoy Antony
>            Assignee: Jun Rao
>         Attachments: KAFKA-2077.patch, kafka-2077-001.patch
>
>
> KafkaLog4jAppender is the Log4j Appender to publish messages to Kafka. 

> Currently , a topic name has to be passed as a parameter. In some use cases, 
> it may be required to use a different topics for the same appender instance. 

> So it may be beneficial to enable KafkaLog4jAppender to accept TopicClass 
> which will provide a topic for a given message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to