Technoboy- commented on a change in pull request #13023:
URL: https://github.com/apache/pulsar/pull/13023#discussion_r767231840
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
##########
@@ -916,30 +916,32 @@ private void doPendingBatchReceiveTask(Timeout timeout) {
protected void triggerListener() {
// Trigger the notification on the message listener in a separate
thread to avoid blocking the networking
// thread while the message processing happens
- try {
- // Control executor to call MessageListener one by one.
- if (executorQueueSize.get() < 1) {
- final Message<T> msg = internalReceive(0,
TimeUnit.MILLISECONDS);
- if (msg != null) {
- executorQueueSize.incrementAndGet();
- if (SubscriptionType.Key_Shared ==
conf.getSubscriptionType()) {
-
executorProvider.getExecutor(peekMessageKey(msg)).execute(() ->
- callMessageListener(msg));
- } else {
- getExternalExecutor(msg).execute(() -> {
- callMessageListener(msg);
- });
+ internalPinnedExecutor.execute(() -> {
Review comment:
Yes, but every consumer instance will bind to one executor.
See : internalExecutorService.getExecutor().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]