dao-jun commented on PR #21102:
URL: https://github.com/apache/pulsar/pull/21102#issuecomment-1773734513
I don't get the key point of why do you want to add the method into
`BrokerInterceptor`.
Because in my understanding, we can also code as:
```
public final class FooBrokerInterceptor implements BrokerInterceptor {
public static final Counter counter =
Counter.Builder()....register();
@Override
public void beforeSendMessage(Subscription subscription,
Entry entry,
long[] ackSet,
MessageMetadata msgMetadata,
Consumer consumer) {
counter.add(...);
}
}
```
--
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]