# How AxoSyslog interacts with Apache Kafka

When stopping the AxoSyslog application, AxoSyslog will not stop until all Java threads are finished, including the threads started by the Kafka Producer. There is no way (except for the `kill -9` command) to stop AxoSyslog before the Kafka Producer stops. To change this behavior set the properties of the Kafka Producer in its properties file, and reference the file in the `properties-file` option.

The AxoSyslog `kafka` destination tries to reconnect to the brokers in a tight loop. This can look as spinning, because of a lot of similar debug messages. To decrease the amount of such messages, set a bigger timeout using the following properties:
```
 
       retry.backoff.ms=1000
        reconnect.backoff.ms=1000
    
```

For details on using property files, see [properties-file()](../../../docs/axosyslog-core/chapter-destinations/configuring-destinations-kafka/reference-destination-kafka/index.md). For details on the properties that you can set in the property file, see the [Apache Kafka documentation](<http://kafka.apache.org/documentation.html#newproducerconfigs>).

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