Metastarx commented on code in PR #11480:
URL: https://github.com/apache/rocketmq/pull/11480#discussion_r4521081816
##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:
##########
@@ -217,7 +241,45 @@ public boolean processConsumeResult(
final ConsumeOrderlyContext context,
final ConsumeRequest consumeRequest
) {
- return true;
+ if (msgs == null || msgs.isEmpty()) {
+ return true;
+ }
+
+ String topic = consumeRequest.getMessageQueue().getTopic();
+
+ // POP mode has no local offset to advance. COMMIT and SUCCESS both
mean that the broker
+ // can forget the popped copy, while ROLLBACK and SUSPEND keep it
available for redelivery.
+ if (ConsumeOrderlyStatus.SUCCESS == status ||
ConsumeOrderlyStatus.COMMIT == status) {
Review Comment:
Done in 5121f08f: SUCCESS no longer acks when the listener manages commits
itself, so a later ROLLBACK or a consumer failure can still redeliver; COMMIT
still acks explicitly.
--
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]