/siddhi-store-mongodb

Extension that can be used to perform DB operations with Mongo DB

Primary LanguageJavaApache License 2.0Apache-2.0

Siddhi Store MongoDB

Jenkins Build Status GitHub Release GitHub Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-store-mongodb extension is an extension to Siddhi that persist and retrieve events to/from MongoDB

For information on Siddhi and it's features refer Siddhi Documentation.

Download

  • Versions 2.x and above with group id io.siddhi.extension.* from here.
  • Versions 1.x and lower with group id org.wso2.extension.siddhi.* from here.

Latest API Docs

Latest API Docs is 2.1.0.

Features

  • mongodb (Store)

    Using this extension a MongoDB Event Table can be configured to persist events in a MongoDB of user's choice.

Dependencies

MongoDB connector jar and its dependencies should be added to the runtime (mongodb-java-driver-3.4.2, includes all the dependencies). For installing third party connectors on various Siddhi execution environments refer Siddhi documentation section on adding third party libraries.

Installation

For installing this extension on various Siddhi execution environments refer Siddhi documentation section on adding extensions.

Running Integration tests in docker containers(Optional)

The MongoDB functionality are tested with the docker base integration test framework. The test framework initializes the docker container according to the given profile before executing the test suite.

  1. Install and run docker in daemon mode.

    • Installing docker on Linux,
      Note:
      These commands retrieve content from get.docker.com web in a quiet output-document mode and install.Then we need to stop docker service as it needs to restart docker in daemon mode. After that, we need to export docker daemon host.

       wget -qO- https://get.docker.com/ | sh
       sudo service dockerd stop
       export DOCKER_HOST=tcp://172.17.0.1:4326
       docker daemon -H tcp://172.17.0.1:4326
      
    • On installing docker on Mac, see Get started with Docker for Mac

    • On installing docker on Windows, see Get started with Docker for Windows

  2. To run the integration tests, issue the following commands.

    • MongoDB 3.4 without SSL connection

        mvn verify -P mongod -Ddocker.removeVolumes=true
      
    • MongoDB 3.4 with SSL connection

        mvn verify -P mongod-ssl -Ddocker.removeVolumes=true
      
    • MongoDB 4.2 mvn verify -P mongod4 -Ddocker.removeVolumes=true

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.

  • If you find any issues related to the extension please report them on the issue tracker.

  • For production support and other contribution related information refer Siddhi Community documentation.