Skip to content
This repository was archived by the owner on Nov 3, 2026. It is now read-only.
cylab-bePublic archive

About

A proxy for mongodb, written in Java

Resources

Stars

5 stars

Watchers

3 watching

Forks

Latest commit

 

History

133 Commits

Folders and files

Repository files navigation

Mongo Proxy

Maven Central Build Status Coverage Status

A proxy for MongoDB written in Java. Using this proxy allows to easily trigger additional actions when data is inserted in the database

Developement now takes place at https://gitlab.cylab.be/cylab/mongo-proxy

Example

// port on which the proxy will be listening 
int PORT = 9632;
ProxyServer srv = new ProxyServer(PORT);
srv.addListener("admin.$cmd", new Listener() {
    @Override
    public void run(Document doc) {
        System.out.println("Notified: " + doc);
    }
});
srv.run();

MongoDb Wire Protocol Structure

this table shows the structure of the driver message for different version of driver and command done.

Version of mongodb driver Command Mongodb Wire protocol
3.5 db/collection/insertOne(document) opCode = Op_Query
. . fullCollectionName = dbName.$cmd
. . Document = [insert:collectionName, ordered:true, documents:[...] ]

About

A proxy for mongodb, written in Java

Resources

Stars

5 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages