Package io.debezium.connector.mongodb
Class MongoDbTopicSelector
java.lang.Object
io.debezium.connector.mongodb.MongoDbTopicSelector
Factory for this connector's
TopicSelector.- Author:
- Randall Hauch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TopicSelector<CollectionId>defaultSelector(String prefix, String heartbeatPrefix) Gets the selector for topics for a given prefix, database name, and collection name.private static StringgetTopicName(CollectionId collectionId, String prefix, String delimiter) Get the name of the topic for a given prefix, database name, and collection name.
-
Constructor Details
-
MongoDbTopicSelector
public MongoDbTopicSelector()
-
-
Method Details
-
defaultSelector
Gets the selector for topics for a given prefix, database name, and collection name. This selector returns "<prefix>.<dbName>.<collectionName>", and does not use the replica set name.- Parameters:
prefix- the prefix; be null or empty if no prefix is neededheartbeatPrefix- the name of the prefix to be used for all heartbeat topics; may not be null and must not terminate in thedelimiter- Returns:
- the topic selector; never null
-
getTopicName
Get the name of the topic for a given prefix, database name, and collection name. This method returns "<prefix><delimiter><dbName><delimiter><collectionName>", and does not use the replica set name.- Parameters:
delimiter- the string delineating the prefix, database, and collection names; may not be nullprefix- the prefix; be null or empty if no prefix is needed- Returns:
- the topic selector; never null
-