File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,18 @@ collections by matching with a regular expression on the collection names:
492
492
493
493
pipeline=[{"$match": {"ns.coll": {"$regex": /^(collection1|collection2)$/}}}]
494
494
495
+ You can also set a regular expression to match all collections except for
496
+ ones that match specific names. The following sample configuration shows
497
+ how you can set your source connector to listen to all collections except
498
+ ones in the collection named "customers":
499
+
500
+ .. code-block:: properties
501
+
502
+ "pipeline":[{"$match": {"ns.coll": {"$regex": "/^(?!customers\.).*/"}}}]
503
+
504
+ For more information on how to build regular expressions, see the
505
+ `Java SE documentation on Patterns <https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html>`__.
506
+
495
507
.. _topic-naming-example:
496
508
497
509
Topic Naming Example
You can’t perform that action at this time.
0 commit comments