-
Notifications
You must be signed in to change notification settings - Fork 12
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
Queue for multi-thread consumers. How to organize consumers for multi-thread access? #21
Comments
Hello, This plugin is designed in such a way to support the multi threaded functionality. Is it possible for you to attach a sample test plan, I will have a look at it and come back at the earliest? |
I have made simple test plan with all used plugins, modified elements were marked with >, except kafka elements. |
Thanks for addressing this issue.
I will release a patch soon to fix this. |
Hey @polyakovmyu After careful read about the consumer group, I came to know that, The Kafka consumer is not thread-safe, and multi-threaded access must be properly synchronized, which can be complex. Typically, a single-threaded model is used where each consumer in a consumer group is mapped to a partition of the topic. If you want to use multiple threads, you should ensure that each thread is consuming from a different partition to avoid conflicts and potential data inconsistencies https://www.confluent.io/blog/kafka-consumer-multi-threaded-messaging/ https://stackoverflow.com/questions/44587416/kafka-single-consumer-group-in-multiple-instances So, you should try reading each thread to partition instead of reading from a global factor on where the broker decides I will look for other options to make it multi threaded - until then, will keep this issue open. If you come across any implementation idea, pls lmk |
My solution is simple table server plugin - enough for my tasks. |
Reading is not always a bottleneck its the insert. Btw, will update here when I implement a logic I have a couple of options in mind but it won't be a replica of the real time scenario |
bump |
Hello!
Assume that we have 1 pool of values for multiple threads and we want to get fresh value every time we ask for it.
Example of it is VTS which I used with LoadRunner. HTTP Simple Table Server has the same idea.
When I launch 2 threads I get exception: KafkaConsumer is not safe for multi-threaded access.
How should I configure consumers to get fresh values with multiple threads and is it possible?
The text was updated successfully, but these errors were encountered: