Skip to content

Commit 0ef4b4b

Browse files
authored
Merge pull request #20 from twiechert/improvement/#18
add warn log message when partition monitor does not match any partitions
2 parents 9b91979 + ef105a7 commit 0ef4b4b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/comcast/kafka/connect/kafka/PartitionMonitor.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ private synchronized Set<LeaderTopicPartition> retrieveLeaderTopicPartitions(int
195195
logger.debug("Server topic list: {}", retrievedTopicSet);
196196
Set<String> matchedTopicSet = retrievedTopicSet.stream().filter(topic -> matchedTopicFilter(topic))
197197
.collect(Collectors.toSet());
198-
logger.debug("Matched topic list: {}", matchedTopicSet);
198+
if (matchedTopicSet.size() > 0) {
199+
logger.debug("Matched topic list: {}", matchedTopicSet);
200+
} else {
201+
logger.warn("Provided pattern {} does currently not match any topic." +
202+
" Thus connector won't spawn any task until partition monitor recognizes matching topic.", this.topicWhitelistPattern.toString());
203+
204+
}
199205

200206
DescribeTopicsOptions describeTopicsOptions = new DescribeTopicsOptions()
201207
.timeoutMs((int) (requestTimeoutMs - (System.currentTimeMillis() - startWait)));

0 commit comments

Comments
 (0)