Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafkaconsumer is not safe for multi-threading access #3655

Open
ayush11-96 opened this issue Dec 1, 2024 · 3 comments
Open

Kafkaconsumer is not safe for multi-threading access #3655

ayush11-96 opened this issue Dec 1, 2024 · 3 comments

Comments

@ayush11-96
Copy link

In what version(s) of Spring for Apache Kafka are you seeing this issue?

For example:

2.8.5

Describe the bug

Caused by: java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access
at org.apache.kafka.clients.consumer.KafkaConsumer.acquire(KafkaConsumer.java:2464)
at org.apache.kafka.clients.consumer.KafkaConsumer.acquireAndEnsureOpen(KafkaConsumer.java:2448)
at org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(KafkaConsumer.java:950)
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.subscribeOrAssignTopics(KafkaMessageListenerContainer.java:1141)
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.(KafkaMessageListenerContainer.java:784)
at org.springframework.kafka.listener.KafkaMessageListenerContainer.doStart(KafkaMessageListenerContainer.java:350)
at org.springframework.kafka.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:466)
at org.springframework.kafka.listener.ConcurrentMessageListenerContainer.doStart(ConcurrentMessageListenerContainer.java:209)
at org.springframework.kafka.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:466)

To Reproduce
During app startup

@sobychacko
Copy link
Contributor

2.8.x is an older release and out of OSS support. See the support timeline: https://spring.io/projects/spring-kafka#support

Please update to a supported OSS version and see if the problem persists.

@ayush11-96
Copy link
Author

currently we are on 3.0.1 for some components but still getting the same issues

@artembilan
Copy link
Member

OK. The 3.0.1 is still one of those out of support, but if you confirm that the problem is there even if supported version, we would like to ask you for a minimal project to reproduce on our side.
Never seen that error, so feels like something else is going on in your own project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants