jerrypeng commented on a change in pull request #10498:
URL: https://github.com/apache/pulsar/pull/10498#discussion_r627917835



##########
File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/MultiConsumerPulsarSource.java
##########
@@ -69,7 +72,20 @@ public void open(Map<String, Object> config, SourceContext 
sourceContext) throws
             cb.messageListener(this);
 
             Consumer<T> consumer = cb.subscribeAsync().join();
-            inputConsumers.add(consumer);
+            inputConsumers.put(TopicName.get(topic), consumer);
+        }
+        if (sourceContext instanceof ExtendedSourceContext) {

Review comment:
       I think this is a little more complicated that it needs to be.  After 
the a PulsarSource is done opening, we can just get a list of consumers from 
the PulsarSource and pass it into the ContextImpl.  That approach will be much 
simpler and we don't need to the additional interfaces.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to