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

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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: core
    • Labels:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: