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
Issue with virtual threads when total concurrency > 256 #3013
Comments
So, don't do that Or what do you propose supposed to be as a fix on the Framework side? Thanks |
With Virtual threads enabled, concurrency shouldn't be limited to some value. The whole point of virtual threads is you can have millions. But it's not the # of virtual threads that's the problem. Spring Kafka must be using something (synchronized?) that's causing it's consumers to be left on platform threads where there is a limit of 256
Well it shouldn't block the application from starting. |
Yeah... I think the problem is really in the Kafka Client by itself. |
If that's the case, does it make sense to use virtual threads at all for spring-kafka even if the spring property (spring.threads.virtual.enabled) is set? |
Agreed, it might not, but we need to make strong confirmation that the problem is there even without Spring Kafka. |
Duplicate of #3074 |
In what version(s) of Spring for Apache Kafka are you seeing this issue?
3.1.1
Describe the bug
Spring fails to start when the total number partitions / concurrency > 256 and virtual threads are enabled.
To Reproduce
Attached is a reproducer.
The test will never succeed.
If you kill the test and run it again, you'll see the following:
The thread id gets stuck at kafka-256 which is the default limit of platform threads for virtual threads.
Expected behavior
The Test should finish / succeed.
Sample
reproducer.zip
The text was updated successfully, but these errors were encountered: