Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 853 Bytes

README.md

File metadata and controls

25 lines (21 loc) · 853 Bytes

MongoDB adaptor

The MongoDB adaptor is capable of reading/tailing collections and receiving data for inserts.

collection_filters is a JSON string where the top level key is the collection name and its value is a query that will be used when iterating the collection. The commented out example below would only include documents where the i field had a value greater than 10.

NOTE You may want to check your collections to ensure the proper index(es) are in place or performance may suffer.

Configuration:

m = mongodb({
  "uri": "mongodb://127.0.0.1:27017/test"
  // "timeout": "30s",
  // "tail": false,
  // "ssl": false,
  // "cacerts": ["/path/to/cert.pem"],
  // "wc": 1,
  // "fsync": false,
  // "bulk": false,
  // "collection_filters": "{\"foo\": {\"i\": {\"$gt\": 10}}}"
})