{"id":13480705,"url":"https://github.com/yonderblue/mongo-queue-java","last_synced_at":"2025-04-15T07:18:36.740Z","repository":{"id":9615432,"uuid":"11541102","full_name":"yonderblue/mongo-queue-java","owner":"yonderblue","description":"Java message queue using MongoDB as a backend","archived":false,"fork":false,"pushed_at":"2017-07-07T21:31:24.000Z","size":136,"stargazers_count":35,"open_issues_count":2,"forks_count":20,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-15T07:18:32.964Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yonderblue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-20T02:54:13.000Z","updated_at":"2022-10-13T08:46:56.000Z","dependencies_parsed_at":"2022-09-22T17:41:30.881Z","dependency_job_id":null,"html_url":"https://github.com/yonderblue/mongo-queue-java","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonderblue%2Fmongo-queue-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonderblue%2Fmongo-queue-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonderblue%2Fmongo-queue-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonderblue%2Fmongo-queue-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yonderblue","download_url":"https://codeload.github.com/yonderblue/mongo-queue-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023745,"owners_count":21199961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:43.991Z","updated_at":"2025-04-15T07:18:36.721Z","avatar_url":"https://github.com/yonderblue.png","language":"Java","funding_links":[],"categories":["Libraries","进程间通信"],"sub_categories":["Java","Spring Cloud框架"],"readme":"#mongo-queue-java\n[![Build Status](https://travis-ci.org/gaillard/mongo-queue-java.png)](https://travis-ci.org/gaillard/mongo-queue-java)\n\nJava message queue using MongoDB as a backend\nAdheres to the 1.0.0 [specification](https://github.com/dominionenterprises/mongo-queue-specification).\n\n##Features\n\n * Message selection and/or count via MongoDB query\n * Distributes across machines via MongoDB\n * Multi language support through the [specification](https://github.com/dominionenterprises/mongo-queue-specification)\n * Message priority\n * Delayed messages\n * Running message timeout and redeliver\n * Atomic acknowledge and send together\n * Easy index creation based only on payload\n\n##Simplest use\n\n```java\nimport com.mongodb.BasicDBObject;\nimport com.mongodb.MongoClient;\nimport gaillard.mongo.Queue;\nimport java.net.UnknownHostException;\n\npublic final class Main {\n\n    public static void main(final String[] args) throws UnknownHostException {\n        final Queue queue = new Queue(new MongoClient().getDB(\"testing\").getCollection(\"messages\"));\n        queue.send(new BasicDBObject());\n        final BasicDBObject message = queue.get(new BasicDBObject(), 60);\n        queue.ack(message);\n    }\n}\n```\n\n##Jar\n\nTo 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\n`target` directory!\n\n##Maven (TODO: Add project to Sonar OSS repo)\n\nTo add the library as a local, per-project dependency use [Maven](http://maven.apache.org)! Simply add a dependency on\nto your project's `pom.xml` file such as:\n\n```xml\n...\n\u003cdependency\u003e\n    \u003cgroupId\u003egaillard\u003c/groupId\u003e\n    \u003cartifactId\u003emongo-queue-java\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n...\n```\n\n##Documentation\n\nFound in the [source](src/main/java/gaillard/mongo/Queue.java) itself, take a look!\n\n##Contact\n\nDevelopers may be contacted at:\n\n * [Pull Requests](https://github.com/gaillard/mongo-queue-java/pulls)\n * [Issues](https://github.com/gaillard/mongo-queue-java/issues)\n\n##Project Build\n\nInstall and start [mongodb](http://www.mongodb.org).\nWith a checkout of the code get [Maven](http://maven.apache.org) in your PATH and run:\n\n```bash\nmvn clean install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonderblue%2Fmongo-queue-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyonderblue%2Fmongo-queue-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonderblue%2Fmongo-queue-java/lists"}