# Prerequisites

Before you can use Kafka as a target endpoint in a Replicate task, the following prerequisites must be met:

* [](https://help.qlik.com/en-US/replicate/Content/Replicate/Main/Kafka/kafka_prereq.htm)Open TCP ports to all the brokers from the Replicate Server machine

* Set permissions that will allow Qlik Replicate to write to the target topics. One way to do this is to use the Kafka ACLs script (kafka-acls).

* Either create a topic named attrep\_apply\_exceptions before starting the replication task or configure the brokers with `auto.create.topics.enable=true`.

  Note that if this topic does not exist, the task will always fail when it encounters a data error, regardless of the [error handling policy](https://help.qlik.com/en-US/replicate/November2024/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/tasks_dataErrorStab.htm).

  For a description of the attrep\_apply\_exceptions table, see [Apply exceptions](https://help.qlik.com/en-US/replicate/November2024/Content/Replicate/Main/Control%20Tables/apply_exceptions.htm)