You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/12/23 09:21:30 UTC

[GitHub] [rocketmq-clients] colprog commented on a diff in pull request #323: Add missing unsubscribe in SimpleConsumer, Addresses #305

colprog commented on code in PR #323:
URL: https://github.com/apache/rocketmq-clients/pull/323#discussion_r1056172082


##########
csharp/rocketmq-client-csharp/Client.cs:
##########
@@ -518,11 +508,16 @@ internal virtual void OnSettingsReceived(rmq::Settings settings)
 
         protected readonly IClientManager Manager;
 
-        protected readonly HashSet<string> _topicsOfInterest = new HashSet<string>();
+        protected readonly ConcurrentDictionary<string, bool> _topicsOfInterest = new ();

Review Comment:
   With this change, we will support dynamically subscribe/unsubscribe to multiple topics, maybe from different threads. C# does not have a ConcurrentSet, thus a ConcurrentDictionary to emulate one.



-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org