Markliniubility commented on code in PR #1264:
URL: 
https://github.com/apache/incubator-eventmesh/pull/1264#discussion_r973903035


##########
eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerRunner.java:
##########
@@ -64,29 +72,33 @@ public void commit(EventMeshAction action) {
                                 case CommitMessage:
                                     // update offset
                                     logger.info("message commit, topic: {}, 
current offset:{}", topicName,
-                                        offset.get());
+                                        rec.offset());
                                     break;
                                 case ReconsumeLater:
                                     // don't update offset
                                     break;
                                 case ManualAck:
                                     // update offset
-                                    offset.incrementAndGet();
                                     logger
-                                        .info("message ack, topic: {}, current 
offset:{}", topicName, offset.get());
+                                        .info("message ack, topic: {}, current 
offset:{}", topicName, rec.offset());
                                     break;
                                 default:
                             }
                         }
                     };
+                    cloudEventToOffset.put(cloudEvent, rec.offset());
                     if (listener != null) {
                         listener.consume(cloudEvent, 
eventMeshAsyncConsumeContext);
                     }
                 });
             }
         } catch (WakeupException e) {
             // Ignore exception if closing
-            if (!closed.get()) throw e;
+            if (!closed.get()) {

Review Comment:
   完成



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to