Skip to content
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

[fix][client] Fix for multiple hit at the interceptor for MultiTopicConsumer #23080

Draft
wants to merge 7 commits into
base: branch-2.10
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ protected Message<T> internalReceive(long timeout, TimeUnit unit) throws PulsarC
long callTime = System.nanoTime();
try {
message = incomingMessages.poll(timeout, unit);
message = beforeConsume(message);
Copy link
Member

@coderzc coderzc Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need to call beforeConsume on internalReceiveAsync、internalReceive(long timeout, TimeUnit unit) 、messageReceived

if (message != null) {
decreaseIncomingMessageSize(message);
checkArgument(message instanceof TopicMessageImpl);
Expand Down Expand Up @@ -1113,7 +1114,7 @@ private ConsumerImpl<T> createInternalConsumer(ConsumerConfigurationData<T> conf
return ConsumerImpl.newConsumerImpl(client, partitionName,
configurationData, client.externalExecutorProvider(),
partitionIndex, true, listener != null, subFuture,
startMessageId, schema, interceptors,
startMessageId, schema, null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't remove interceptors from internal consumer directly this will make other interceptor methods not work

createIfDoesNotExist, startMessageRollbackDurationInSec);
}

Expand Down