Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonderblue/mongo-queue-java
Java message queue using MongoDB as a backend
https://github.com/yonderblue/mongo-queue-java
Last synced: 9 days ago
JSON representation
Java message queue using MongoDB as a backend
- Host: GitHub
- URL: https://github.com/yonderblue/mongo-queue-java
- Owner: yonderblue
- Created: 2013-07-20T02:54:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-07T21:31:24.000Z (over 7 years ago)
- Last Synced: 2024-05-23T06:49:51.214Z (6 months ago)
- Language: Java
- Size: 133 KB
- Stars: 35
- Watchers: 7
- Forks: 20
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mongodb - mongo-queue-java - Java message queue on top of MongoDB (Libraries / Java)
- awesome-mongodb - mongo-queue-java - Java message queue on top of MongoDB (Libraries / Java)
README
#mongo-queue-java
[![Build Status](https://travis-ci.org/gaillard/mongo-queue-java.png)](https://travis-ci.org/gaillard/mongo-queue-java)Java message queue using MongoDB as a backend
Adheres to the 1.0.0 [specification](https://github.com/dominionenterprises/mongo-queue-specification).##Features
* Message selection and/or count via MongoDB query
* Distributes across machines via MongoDB
* Multi language support through the [specification](https://github.com/dominionenterprises/mongo-queue-specification)
* Message priority
* Delayed messages
* Running message timeout and redeliver
* Atomic acknowledge and send together
* Easy index creation based only on payload##Simplest use
```java
import com.mongodb.BasicDBObject;
import com.mongodb.MongoClient;
import gaillard.mongo.Queue;
import java.net.UnknownHostException;public final class Main {
public static void main(final String[] args) throws UnknownHostException {
final Queue queue = new Queue(new MongoClient().getDB("testing").getCollection("messages"));
queue.send(new BasicDBObject());
final BasicDBObject message = queue.get(new BasicDBObject(), 60);
queue.ack(message);
}
}
```##Jar
To add the library as a jar simply [Build](#project-build) the project and use the `mongo-queue-java-1.0.0.jar` from the created
`target` directory!##Maven (TODO: Add project to Sonar OSS repo)
To add the library as a local, per-project dependency use [Maven](http://maven.apache.org)! Simply add a dependency on
to your project's `pom.xml` file such as:```xml
...gaillard
mongo-queue-java
1.0.0...
```##Documentation
Found in the [source](src/main/java/gaillard/mongo/Queue.java) itself, take a look!
##Contact
Developers may be contacted at:
* [Pull Requests](https://github.com/gaillard/mongo-queue-java/pulls)
* [Issues](https://github.com/gaillard/mongo-queue-java/issues)##Project Build
Install and start [mongodb](http://www.mongodb.org).
With a checkout of the code get [Maven](http://maven.apache.org) in your PATH and run:```bash
mvn clean install
```