Jedisque is a minimal java client for Disque.
Jedisque uses Jedis as a redis client.
To use it just:
<repositories>
<repository>
<id>nutzcn-snapshots</id>
<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.xetorthio</groupId>
<artifactId>jedisque</artifactId>
<version>0.0.5-SNAPSHOT</version>
</dependency>
</dependencies>
</repositories>
jedisque依赖jedis2.7.2, 2.7.3以上版本不向下兼容, 日了狗了, 只能把jedis2.7.2改名打入jedisque里, 只支持快照版
Jedisque q = new Jedisque(
new URI("disque://192.168.0.1:7711"),
new URI("disque://192.168.0.4:8822")
);
String jobId = q.addJob("foo", "bar", 10000);
Jedisque q = new Jedisque(
new URI("disque://192.168.0.1:7711"),
new URI("disque://192.168.0.4:8822")
);
List<Job> jobs = q.getJob("foo", "foo2");
For more usage examples check the tests.
And you are done!