Kafka
  1. Kafka
  2. KAFKA-323

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major 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();

      1. appender.patch
        3 kB
        Jose Quinteiro

        Activity

        Jose Quinteiro created issue -
        Jose Quinteiro made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jose Quinteiro made changes -
        Attachment appender.patch [ 12520508 ]
        Jay Kreps made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Jay Kreps [ jkreps ]
        Fix Version/s 0.8 [ 12317244 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development