Exemple #1
0
 def start_appender(self, security_protocol):
     self.appender = KafkaLog4jAppender(self.test_context,
                                        self.num_brokers,
                                        self.kafka,
                                        TOPIC,
                                        MAX_MESSAGES,
                                        security_protocol=security_protocol)
     self.appender.start()
Exemple #2
0
    def __init__(self, test_context):
        super(Log4jAppenderTest, self).__init__(test_context, num_zk=1, num_brokers=1, topics={
            TOPIC: {'partitions': 1, 'replication-factor': 1}
        })
        self.num_nodes = 1

        self.appender = KafkaLog4jAppender(self.test_context, self.num_nodes, self.kafka, TOPIC, MAX_MESSAGES)
        self.consumer = ConsoleConsumer(self.test_context, num_nodes=self.num_nodes, kafka=self.kafka, topic=TOPIC, consumer_timeout_ms=1000)