I read the following from the manual. However, i could not seem to find this requirement from apache kafka documentation? We would like to use hostname + source filename to be kafka event key, which is definitely not unique. something like the following:
key: ['beat.hostname', 'source']
Optional Kafka event key. If configured, the event key must be unique and can be extracted from the event using a format string.