Giter Site home page Giter Site logo

jdwilly2001 / quartz-mongodb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michaelklishin/quartz-mongodb

0.0 1.0 0.0 669 KB

A MongoDB-based store for Quartz. This fork strives to be as feature complete as possible. Originally by MuleSoft.

License: Other

Java 65.11% Groovy 34.89%

quartz-mongodb's Introduction

A MongoDB-based store for Quartz.

This is a MongoDB-backed job store for the Quartz scheduler.

Maven Artifacts

Artifacts are released to Bintray.

If you are using Maven, add the following repository definition to your pom.xml:

<repositories>
    <repository>
        <id>michaelklishin</id>
        <url>https://dl.bintray.com/michaelklishin/maven/</url>
    </repository>
</repositories>

If you are using Gradle, add the following to your build.gradle:

repositories {
    maven {
        url "https://dl.bintray.com/michaelklishin/maven/"
    }
}

The Most Recent Release

With Maven:

<dependency>
    <groupId>com.novemberain</groupId>
    <artifactId>quartz-mongodb</artifactId>
    <version>2.0.0</version>
</dependency>

With Gradle:

compile "com.novemberain:quartz-mongodb:2.0.0"

Usage

Set your Quartz properties to something like this:

# Use the MongoDB store
org.quartz.jobStore.class=com.novemberain.quartz.mongodb.MongoDBJobStore
# MongoDB URI (optional if 'org.quartz.jobStore.addresses' is set)
org.quartz.jobStore.mongoUri=mongodb://localhost:27020
# comma separated list of mongodb hosts/replica set seeds (optional if 'org.quartz.jobStore.mongoUri' is set)
org.quartz.jobStore.addresses=host1,host2
# database name
org.quartz.jobStore.dbName=quartz
# Will be used to create collections like mycol_jobs, mycol_triggers, mycol_calendars, mycol_locks
org.quartz.jobStore.collectionPrefix=mycol
# thread count setting is ignored by the MongoDB store but Quartz requries it
org.quartz.threadPool.threadCount=1

If you use Quartzite or want your job classes to be available to Clojure code, use:

org.quartz.jobStore.class=com.novemberain.quartz.mongodb.DynamicMongoDBJobStore

(this assumes Clojure jar is on classpath).

Job Data storage

By default you are allowed to pass any java.io.Serializable objects inside JobDataMap. It will be serialized and stored as a base64 string.

If your JobDataMap only contains simple types, it may be stored directly inside MongoDB to save some performance.

org.quartz.jobStore.jobDataAsBase64=false

Clustering

To enable clustering set the following property:

# turn clustering on:
org.quartz.jobStore.isClustered=true

# Must be unique for each node or AUTO to use autogenerated:
org.quartz.scheduler.instanceId=AUTO
# org.quartz.scheduler.instanceId=node1

# The same cluster name on each node:
org.quartz.scheduler.instanceName=clusterName

Each node in a cluster must have the same properties, except instanceId. To setup other clusters use different collection prefix:

org.quartz.scheduler.collectionPrefix=yourCluster

Different time settings for cluster operations:

# Frequency (in milliseconds) at which this instance checks-in to cluster.
# Affects the rate of detecting failed instances.
# Defaults to 7500 ms.
org.quartz.jobStore.clusterCheckinInterval=10000

# Time in millis after which a trigger can be considered as expired.
# Defaults to 10 minutes:
org.quartz.jobStore.triggerTimeoutMillis=1200000

# Time in millis after which a job can be considered as expired.
# Defaults to 10 minutes:
org.quartz.jobStore.jobTimeoutMillis=1200000

# Time limit in millis after which a trigger should be treated as misfired.
# Defaults to 5000 ms.
org.quartz.jobStore.misfireThreshold=10000

# WriteConcern timeout in millis when writing in Replica Set.
# Defaults to 5000 ms.
org.quartz.jobStore.mongoOptionWriteConcernTimeoutMillis=10000

Continuous Integration

Build Status

CI is hosted by Travis CI

Copyright & License

(c) Michael S. Klishin, Alex Petrov, 2011-2016.

Apache Public License 2.0

FAQ

Project Origins

The project was originally started by MuleSoft. It supports all Quartz trigger types and tries to be as feature complete as possible.

Why the Fork?

MuleSoft developers did not respond to attempts to submit pull requests for several months. As more and more functionality was added and implementation code refactored, I decided to completely separate this fork form GitHub forks network because the project is now too different from the original one. All changes were made with respect to the Apache Public License 2.0.

quartz-mongodb's People

Contributors

michaelklishin avatar pwojnowski avatar dandiep avatar jochenberger avatar ifesdjeen avatar seilnacht avatar illyr avatar mixamlv avatar lordbuddha avatar msimerson avatar dorogush avatar hofmeister avatar vladvoic avatar vivganes avatar benromberg avatar chrismyang avatar siscia avatar bitdeli-chef avatar richterfritz avatar korest avatar slawomirsepiol avatar sboekhoff avatar daniel-h avatar killme2008 avatar huang1900z avatar jacobsatelbrys avatar jwicks avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.