MongoError: The field 'db' is not a valid collection option. Options: { db: "mongodb://localhost:27017/sync", collection: "events", capped: true, size: 5242880 }
The error stems from mubsub, which only takes four config options passed to client.channel: size, max, retryInterval, and recreate. The solution is simple, delete config.db and config.collection after using them.
I noticed a bug with mongodb using this application setup:
On startup, an error was being thrown:
MongoError: The field 'db' is not a valid collection option. Options: { db: "mongodb://localhost:27017/sync", collection: "events", capped: true, size: 5242880 }
The error stems from mubsub, which only takes four config options passed to
client.channel
:size
,max
,retryInterval
, andrecreate
. The solution is simple, deleteconfig.db
andconfig.collection
after using them.