KafkaMessageListenerContainer vs ConcurrentMessageListenerContainer?

blazingSaddles /

I understand how both classes can be used to implement Kafka listeners in Spring Boot but when should you use one over the other??? Any help appreciated!

Your thoughts?

iBuiltUber /

A ConcurrentMessageListenerContainer manages a collection of KafkaMessageListenerContainer.

FewerLinesThanYou /

Kafka consumers are not thread safe. For these reasons, most people rely on the ConcurrentMessageListenerContainer to create a multi-threaded environment for consuming messages.

When you use something like @KafkaListener it's utilizing the ConcurrentMessageListenerContainer automatically as the default container factory.