!!Kafka task
\\
__Apache Kafka__ is a high-performance, open-source distributed event streaming platform developed by the __Apache Software Foundation__. It is designed for building real-time data pipelines and stream-processing applications that handle high-throughput, fault-tolerant, and scalable message flows across systems. (More info : [Apache Kafak Link|https://kafka.apache.org/])\\
----
⚠️  Download the required JAR files and copy them into the __CrushFTP/plugins/lib/__ directory:\\
[Download kafka-clients.jar Link|kafka-clients.jar]\\
[Download kafka-streams.jar Link|kafka-streams.jar]\\
After placing the files, restart the CrushFTP service to apply the changes.\\
----
\\
The Kafka Task allows you to send either file contents or custom messages to a specified Kafka topic.\\
\\
[attachments|kafka_task.png]\\
\\
To use custom __SASL__ connection settings, enable the __Load custom client config__ flag. This allows you to provide your own client configuration properties.\\
\\
[attachments|kafka_custom_config.png]\\
\\
__Custom SASL Config example__:
\\
{{{
#KafkaTask SASL properties file example

# Kafka server host and port.
bootstrap.servers=192.168.10:9092

# Client id
client.id=MyCrushFTP

# Serializer (Do not change!)
key.serializer=org.apache.kafka.common.serialization.StringSerializer
value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer

#Max block and timeout
max.block.ms=10000
request.timeout.ms=20000 

#Authentication related settings
security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
    username="kafka-username" \
    password="kafka-password";
}}}\\
\\
Documentation Links:\\
• [Apache Kafka – Security (SASL) Link| https://kafka.apache.org/documentation/#security_sasl]\\
• [JAAS Configuration for Kafka Clients Link |https://kafka.apache.org/documentation/#security_sasl_clientconfig]\\
• [SASL Authentication with PLAIN Mechanism Link|https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_plain.htm]\\
\\
__ KafkaTask SASL properties Explained__:\\
\\
__# Kafka server host and port__:\\
• Specifies the address of the Kafka broker to connect to.\\
• You can list multiple brokers separated by commas for failover: 192.168.10:9092,192.168.11:9092\\
\\
__# Client id__:\\
•	A unique identifier for the client. This is useful for logging and monitoring within Kafka.\\
\\
__# Serializer (Do not change!)__:\\
•	These specify how the key and value of each Kafka message are serialized.\\
•	Key serializer: Converts the message key to a string.\\
•	Value serializer: Converts the message content (e.g. a file) into a byte array.\\
•	⚠️ Do not change!\\
\\
__#Max block and timeout__:\\
 •	max.block.ms: Maximum time (in milliseconds) a __send__ call will block if the buffer is full. Here, 10 seconds.\\
 •	request.timeout.ms: Time before a request is considered failed due to no response. Set to 20 seconds here.\\
\\
__#Authentication related settings__:\\
• security.protocol: Sets how the client communicates with Kafka.\\
•	SASL_PLAINTEXT means SASL authentication over a plaintext (non-encrypted) channel.\\
•	Use SASL_SSL if you want to secure the connection. \\
•	sasl.mechanism: The SASL mechanism used. PLAIN is username/password-based authentication.\\
\\
__sasl.jaas.config__:
•	sasl.jaas.config: The JAAS (Java Authentication and Authorization Service) configuration line to authenticate with Kafka using SASL/PLAIN.\\
•	username / password: Replace these with your actual Kafka credentials.\\
\\