...
Code Block | ||
---|---|---|
| ||
public final static class Source extends AbstractNode implements TopologyDescription.Source {
// Other methods and variables are not shown here
@Override
public String topics() {
return topics.toString();
}
@Override
public Set<String> topicSet() {
return topics;
}
@Override
public Pattern topicPattern() {
return topicPattern;
}
}
public final static class Sink extends AbstractNode implements TopologyDescription.Sink {
// Other methods and variables are not shown here
// Output the topic name if dynamic routing is not used. Otherwise, output the toString value of the TopicNameExtractor.
@Override
public TopicNameExtractor topicNameExtractor() {
if (topicNameExtractor instanceof StaticTopicNameExtractor) {
return null;
} else {
return topicNameExtractor;
}
}
} |
Compatibility, Deprecation, and Migration Plan
No known compatibility issuesDeprecating topics() because it is no longer needed with the addition of topicSet(). In order to get the same functionality, a user can just call topicSet().toString().