I try to get data from amazon managed kafka service named msk.
That msk using iam.
I set input like below and also put "aws-msk-iam-auth-2.1.0-all.jar" file to logstash module directory.
logstash input :
input {
kafka {
bootstrap_servers => "msk endpoint"
security_protocol => "SASL_SSL"
sasl_mechanism => "AWS_MSK_IAM"
sasl_jaas_config => "software.amazon.msk.auth.iam.IAMLoginModule required sasl.client.callback.handler.class=software.amazon.msk.auth.iam.IAMClientCallbackHandler;"
topics => ["topic name"]
group_id => "group name"
consumer_threads => 20
max_poll_records => 1500
}
}
but i got error log like below
[2024-04-26T08:45:58,354][ERROR][logstash.inputs.kafka ] Unable to create Kafka consumer from given configuration {:kafka_error_message=>#<Java::OrgApacheKafkaCommon::KafkaException: Failed to construct kafka consumer>, :cause=>#<Java::OrgApacheKafkaCommon::KafkaException: java.lang.NoClassDefFoundError: Could not initialize class software.amazon.msk.auth.iam.IAMLoginModule>}
[2024-04-26T08:45:58,354][ERROR][logstash.javapipeline ] A plugin had an unrecoverable error. Will restart this plugin.
please give advice