Skip to main content

Mongo Connector Transaction Support

Project description

The mongo-connector-transaction project originated as a project that is based on already exists mongo-connector.

This repository and the library it provides are just for supporting mongo-connector to be able to work with transactions process as when it was built it doesn’t consider the different oplog structure for the transaction oplog documents.

Currently it only supports integration with elastic2-doc-manager

For complete documentation, check out the Mongo Connector Wiki.

Note: Pardon me if the documents could be a little missy but the library supports everything that mongo-connector used to support but you shall add -transaction part only.

System Overview

mongo-connector-transaction creates a pipeline from a MongoDB cluster to one or more target systems, such as Solr, Elasticsearch, or another MongoDB cluster. It synchronizes data in MongoDB to the target then tails the MongoDB oplog, keeping up with operations in MongoDB in real-time. Detailed documentation is available on the wiki.

Getting Started

mongo-connector-transaction supports Python 3.4+ and MongoDB versions 3.4 and 3.6.

Installation

To install mongo-connector-transaction with the MongoDB doc manager suitable for replicating data to MongoDB, use pip:

pip install mongo-connector-transaction

The install command can be customized to include the Doc Managers and any extra dependencies for the target system.

Target System

Install Command

MongoDB

pip install mongo-connector-transaction

Elasticsearch 5.x

pip install 'mongo-connector-transaction[elastic5]'

You may have to run pip with sudo, depending on where you’re installing mongo-connector and what privileges you have.

System V Service

Mongo Connector provides support for installing and uninstalling itself as a service daemon under System V Init on Linux. Following install of the package, install or uninstall using the following command:

$ python -m mongo_connector.service.system-v [un]install

Development

You can also install the development version of mongo-connector manually:

git clone https://github.com/AmrAdelKhalil/mongo-connector
pip install ./mongo-connector

Using mongo-connector

mongo-connector replicates operations from the MongoDB oplog, so a replica set must be running before startup. For development purposes, you may find it convenient to run a one-node replica set (note that this is not recommended for production):

mongod --replSet myDevReplSet

To initialize your server as a replica set, run the following command in the mongo shell:

rs.initiate()

Once the replica set is running, you may start mongo-connector. The simplest invocation resembles the following:

mongo-connector-transaction -m <mongodb server hostname>:<replica set port> \
                -t <replication endpoint URL, e.g. http://localhost:8983/solr> \
                -d <name of doc manager, e.g., solr_doc_manager>

mongo-connector has many other options besides those demonstrated above. To get a full listing with descriptions, try mongo-connector-transaction --help. You can also use mongo-connector with a configuration file.

If you want to jump-start into using mongo-connector with a another particular system, check out:

Doc Managers

Elasticsearch 2.x and 5.x: https://github.com/AmrAdelKhalil/elastic2-doc-manager

The MongoDB doc manager comes packaged with the mongo-connector project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mongo-connector-transaction-1.7.0.tar.gz (90.8 kB view details)

Uploaded Source

File details

Details for the file mongo-connector-transaction-1.7.0.tar.gz.

File metadata

  • Download URL: mongo-connector-transaction-1.7.0.tar.gz
  • Upload date:
  • Size: 90.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11

File hashes

Hashes for mongo-connector-transaction-1.7.0.tar.gz
Algorithm Hash digest
SHA256 5bc3d7644c6c0f6a2406c9e204335fc7b9da0d0ca68cb68d5503757416c43644
MD5 80ff0c4cc94855f92e8868ee2a9309f9
BLAKE2b-256 a66cd9291c711a61cd23b6959c83ed9653711e0e9d3e315e93265342d743a5ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page