Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-323

Add the ability to use the async producer in the Log4j appender

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0
    • core

    Description

      I needed the log4j appender to use the async producer, so I added a couple of configuration methods to the log4j appender. I only added methods for the configuration fields that I needed. There are several in in the various ProducerConfigs that still cannot be set in the appender.

      Sample use:

      KafkaLog4jAppender kafkaAppender = new KafkaLog4jAppender();
      kafkaAppender.setZkConnect( "localhost:2181/kafka" );
      kafkaAppender.setTopic( "webapp" );
      kafkaAppender.setProducerType( "async" );
      kafkaAppender.setEnqueueTimeout( Integer.toString( Integer.MIN_VALUE ) );
      kafkaAppender.activateOptions();

      Attachments

        1. appender.patch
          3 kB
          Jose Quinteiro

        Activity

          People

            jkreps Jay Kreps
            joseq Jose Quinteiro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: