bcaw-ofeer opened a new issue, #1081:
URL: https://github.com/apache/rocketmq-clients/issues/1081

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Programming Language of the Client
   
   Java
   
   ### Summary
   
   Currently, when message interceptors filter out messages during the doAfter 
phase in ProcessQueueImpl, the filtered messages are not properly acknowledged, 
and the original ReceiveMessageResult still contains all messages including the 
filtered ones. This leads to potential message processing inconsistencies and 
resource leaks.
   
   ### Motivation
   
   The current implementation has several issues:
   1. Inconsistent Processing: The onReceiveMessageResult method receives all 
original messages, including those that should have been filtered out by 
interceptors, leading to unnecessary processing.
   2. Interceptor Contract Violation: The interceptor filtering mechanism 
doesn't properly propagate changes back to the message processing pipeline.
   
   
   
   ### Describe the Solution You'd Like
   
   The solution should implement the following behavior:
   ● Automatic Acknowledgment: Messages filtered out by interceptors should be 
automatically acknowledged before proceeding to onReceiveMessageResult.
   ● Result Filtering: Create a new ReceiveMessageResult object that contains 
only the messages that passed through the interceptor filtering.
   ● Proper Tracking: Maintain proper logging and metrics for filtered vs. 
processed messages.
   
   ### Describe Alternatives You've Considered
   
   none
   
   ### Additional Context
   
   none


-- 
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]

Reply via email to