cayasso / mongo-oplog

Watch mongodb oplog in a simple way
381 stars 91 forks source link

can this lib listen for creation of new collections #21

Closed ORESoftware closed 9 years ago

ORESoftware commented 9 years ago

I am not super familiar with MongoDB, but I assume that you can create a new collection in MongoDB without adding a document to the collection.

Furthermore, you can add databases and collections to databases on the fly pretty easily.

So is it possible for this library to listen for database or collection creation events?

cayasso commented 9 years ago

Hey @ORESoftware I might think its possible to add by listening to the high level operations "c" or "db" of the oplog however this feature is out of scope for this project, I really don't see or cannot think of a compelling use case to add such a feature.

ORESoftware commented 9 years ago

Listening to new db creations might be a little much, but creating collections on the fly happens frequently, so it might be useful for this lib to make it clear how to listen for those events? I can create a pull request if you think that listening for collection creation events is useful.

cayasso commented 9 years ago

Sure I am open for PRs

JB

On Tue, Aug 25, 2015 at 2:55 PM, Operations Research Engineering +Software < notifications@github.com> wrote:

Listening to new db creations might be a little much, but creating collections on the fly happens frequently, so it might be useful for this lib to make it clear how to listen for those events? I can create a pull request if you think that listening for collection creation events is useful.

— Reply to this email directly or view it on GitHub https://github.com/cayasso/mongo-oplog/issues/21#issuecomment-134738927.

J.B.

ORESoftware commented 9 years ago

alright I will work on it thx