You need to configure 3 things:
-
Brokers
-
Filebeat kafka output
-
Consumer
Here a example (change paths according your environment).
Broker configuration:
# open kafka server configuration file
vim /opt/kafka/config/server.properties
# add this line
# The largest record batch size allowed by Kafka.
message.max.bytes=100000000
# restart kafka service
systemctl restart kafka.service
Filebeat kafka output:
# Consumer configuration:
# larger than the max.message.size
max.partition.fetch.bytes=200000000
# 以下内容可以不添加
output.kafka:
...
max_message_bytes: 100000000