merlimat commented on a change in pull request #3962: Feature / Interceptor for
negative ack redelivery
URL: https://github.com/apache/pulsar/pull/3962#discussion_r277055193
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerInterceptors.java
##########
@@ -62,9 +63,9 @@ public ConsumerInterceptors(List<ConsumerInterceptor<T>>
interceptors) {
*/
public Message<T> beforeConsume(Consumer<T> consumer, Message<T> message) {
Message<T> interceptorMessage = message;
- for (int i = 0; i < interceptors.size(); i++) {
+ for (ConsumerInterceptor<T> interceptor : interceptors) {
Review comment:
The reason for using int index was to avoid creating the iterator object
(because then it needs to be GCed)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services