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-c() destination, and important information about the declaration of the destination.

Prerequisites and restrictions

Declaration:

Terminal window
kafka-c(
    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-c destination, using only the required options.

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

You can also use the kafka() name, which is an SCL alias for kafka-c(). In that case, your configuration must contain @include "scl.conf". For details, see kafka: Publish messages to Apache Kafka.