# 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

  * Since the new C implementation uses the [librdkafka client library](<https://docs.confluent.io/2.0.0/clients/librdkafka/index.html>), the `kafka` destination has less memory usage than the previous Java implementation (which uses the official Java Kafka producer).

  * If you used the Java implementation before, see [Shifting from Java implementation to C implementation](../../../docs/axosyslog-core/chapter-destinations/configuring-destinations-kafka-c/destination-kafka-c-from-java/index.md).

  * The AxoSyslog `kafka` destination supports all properties of the official Kafka producer. For details, see [the librdkafka documentation](<https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md>).

  * For the list of options, see [Options of the kafka() destination’s C implementation](../../../docs/axosyslog-core/chapter-destinations/configuring-destinations-kafka-c/reference-destination-kafka-c/index.md).




## 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}")
      );
    };
    
```

Last modified July 2, 2023: [Change highlight mode of code examples (2f8a9593)](<https://github.com/axoflow/axosyslog-core-docs/commit/2f8a95937c6498193e7168ce8b0dc831e9f0f8ad>)