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


##########
eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/ConsumerImpl.java:
##########
@@ -108,9 +109,9 @@ public void subscribe(String topic) {
 
     public void unsubscribe(String topic) {
         try {
-            // Get the current subscription
+            // Kafka will unsubscribe *all* topic if calling unsubscribe, so we
             this.kafkaConsumer.unsubscribe();
-            topicsSet.add(topic);
+            topicsSet.remove(topic);

Review Comment:
   添加了`synchronized`保证线程安全



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