jerrypeng commented on a change in pull request #10498:
URL: https://github.com/apache/pulsar/pull/10498#discussion_r630560486
##########
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:
@dlg99 In `JavaInstanceRunnable`, once you instantiate and call `open`
on the PulsarSource, just also call another method called `getConsumers()` to
get the list of consumers and then pass it into ContextImpl when it gets
instantiated. It is much simpler that way.
--
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]