horoc commented on code in PR #2902:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2902#discussion_r1068282482


##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/EventMeshGrpcConsumer.java:
##########
@@ -130,7 +144,7 @@ public void subscribe(List<SubscriptionItem> 
subscriptionItems) {
 
     private void addSubscription(List<SubscriptionItem> subscriptionItems, 
String url) {
         for (SubscriptionItem item : subscriptionItems) {
-            subscriptionMap.put(item.getTopic(), new SubscriptionInfo(item, 
url));
+            subscriptionMap.putIfAbsent(item.getTopic(), new 
SubscriptionInfo(item, url));

Review Comment:
   Shall we update the subscription info if the topic exists?



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