Skip to content

Commit

Permalink
Update ContextImpl.java
Browse files Browse the repository at this point in the history
  • Loading branch information
nikam14 authored Sep 26, 2024
1 parent 32967db commit 5cdb582
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,8 @@ public void setInputConsumers(List<Consumer<?>> inputConsumers) {
topicConsumers.putIfAbsent(TopicName.get(consumer.getTopic()), consumer);
if (consumer.getTopic().contains("-partition-")) {
partionedTopicPresent = true;
}});
}
});
}

private void reloadConsumersFromMultiTopicsConsumers() {
Expand All @@ -738,7 +739,8 @@ private void reloadConsumersFromMultiTopicsConsumers() {
topicConsumers.putIfAbsent(TopicName.get(c.getTopic()), c);
if (c.getTopic().contains("-partition-")) {
partionedTopicPresent = true;
}});
}
});
}

// returns null if consumer not found
Expand All @@ -761,7 +763,7 @@ Consumer<?> getConsumer(String topic, int partition) throws PulsarClientExceptio
throw new PulsarClientException("Getting consumer is not supported");
}

if (partition != 0 && partionedTopicPresent == false) {
if ((partition != 0) && (partionedTopicPresent == false)) {
throw new PulsarClientException("No Partioned topic present");
}

Expand Down

0 comments on commit 5cdb582

Please sign in to comment.