This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Before you begin

This section describes the prerequisites and restrictions for using the kafka destination in the new C implementation, and important information about the declaration of the destination.

Prerequisites and restrictions

Declaration:

   @define kafka-implementation kafka-c
    
    kafka(
        bootstrap-servers("1.2.3.4:9092,192.168.0.2:9092")
        topic("{MYTOPIC}")
    
    );

Example: Sending log data to Apache Kafka

The following example defines a kafka destination in the new C implementation, using only the required parameters.


@define kafka-implementation kafka-c 
@include "scl.conf"

destination d_kafka {
  kafka(
    bootstrap-servers("1.2.3.4:9092,192.168.0.2:9092")
    topic("{MYTOPIC}")
  );
};