Package io.debezium.connector.mongodb
Class MongoDbTopicSelector
- java.lang.Object
-
- io.debezium.connector.mongodb.MongoDbTopicSelector
-
@ThreadSafe public class MongoDbTopicSelector extends Object
Factory for this connector'sTopicSelector.- Author:
- Randall Hauch
-
-
Constructor Summary
Constructors Constructor Description MongoDbTopicSelector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
defaultSelector
public static TopicSelector<CollectionId> defaultSelector(String prefix, String heartbeatPrefix)
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
private static String getTopicName(CollectionId collectionId, String prefix, String delimiter)
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
-
-