jinxiaoyi commented on issue #20813:
URL: https://github.com/apache/pulsar/issues/20813#issuecomment-1637476464
> > for (int i = 0; i < 200; i++) {
stringProducer.newMessage().key(UUID.randomUUID().toString()).value("aaaa").send();
}
>
> Do you want to fix it ?
in consumerBase.class
private void triggerListener() {
this.internalPinnedExecutor.execute(() -> {
while(true) {
try {
Message<T> msg = this.internalReceive(0L,
TimeUnit.MILLISECONDS);
if (msg != null) {
if (SubscriptionType.Key_Shared ==
this.conf.getSubscriptionType()) {
this.executorProvider.getExecutor(this.peekMessageKey(msg)).execute(() -> {
this.callMessageListener(msg);
});
} else {
this.getExternalExecutor(msg).execute(() -> {
this.callMessageListener(msg);
});
}
} else if (log.isDebugEnabled()) {
log.debug("[{}] [{}] Message has been cleared from
the queue", this.topic, this.subscription);
}
if (msg != null) {
continue;
}
} catch (PulsarClientException var3) {
log.warn("[{}] [{}] Failed to dequeue the message for
listener", new Object[]{this.topic, this.subscription, var3});
}
return;
}
});
}
may i delete if (SubscriptionType.Key_Shared ==
this.conf.getSubscriptionType()) ?
--
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]