Explorar o código

added function in prosumer to support individual topics

bobhk %!s(int64=9) %!d(string=hai) anos
pai
achega
c65afdf48e
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/comms/test/base_messaging.py

+ 3 - 2
src/comms/test/base_messaging.py

@@ -340,8 +340,9 @@ class Prosumer(BaseProducer):
         self.kwargs = kwargs
         
     
-
-    
+    def add_listener_topics(self, listener, topics):
+        map(lambda e: self.kconsumer.register(e, listener, getattr(listener, e)), topics)
+        
     def add_listeners(self, listeners):
         
         for l in listeners: