-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Partitioned Consumer and Listener Threads #80
Comments
The The individual |
Yes, I realize it will not block IO threads, but it will block other |
OK, that is a good point. The key part is to leave the messages in the single topics queues, so that we can stop the broker from pushing more messages. If that can be done without recurring to blocking the intermediate listener thread, that would be great. |
… queue for partitioned consumer
Fixed by #106 |
current code will cause too much lookup. This PR try to cache the topic lookup result for topics that served by this broker. For the topics that not served by this broker, we should not cache it, since it is not able to track the topic reloading, and will cause conflict.
I understand that Pulsar Client could and should definitely be shared among Publisher and Consumer instances to take advantage of Netty's IO threads and share them among all instances.
But there seems to be an issue particularly with
PartitionedConsumerImpl
because it uses amessageListener
to receive messages form it's internalConsumerImpl
s.Listener are executed in a pool of configurable size, but
PartitionedConsumerImpl
does blocking calls, so this is definitely a problem. If, for some reason, aPartitionedConsumer
stops consuming messages, it will block listener threads equal to the amount of partitions it has, or maybe even more.I don't really have a solution, but we should definitely have a better approach to
PartitionedConsumerImpl
The text was updated successfully, but these errors were encountered: