-
Notifications
You must be signed in to change notification settings - Fork 4
Getting Started
You can get started with spinach in various ways.
Add these lines to file pom.xml:
<dependency>
<groupId>biz.paluch.redis</groupId>
<artifactId>spinach</artifactId>
<version>0.1</version>
</dependency>
Add these lines to file ivy.xml:
<ivy-module>
<dependencies>
<dependency org="biz.paluch.redis" name="spinach" rev="0.1"/>
</dependencies>
</ivy-module>
Add these lines to file build.gradle:
dependencies {
compile 'biz.paluch.redis:spinach:0.1'
}
Download the latest binary package from https://github.com/mp911de/spinach/releases and extract the archive
So easy! No more boring routines, we can start.
Import required classes:
import biz.paluch.spinach.*;
import biz.paluch.spinach.api.*;
import biz.paluch.spinach.api.sync.*;
import java.util.concurrent.TimeUnit;
and now, write your code:
DisqueClient disqueClient = DisqueClient.create(DisqueURI.create("disque://password@localhost:7711"));
DisqueCommands<String, String> sync = disqueClient.connect().sync();
sync.addjob("queue", "body", 1, TimeUnit.MINUTES);
Job<String, String> job = sync.getjob("queue");
sync.ackjob(job.getId());
sync.close();
disqueClient.shutdown();
Done!
Do you want to see working examples?
This wiki and the README document contains a lot of information, please take your time and read these instructions carefully.
If you run into any trouble, you may start with getting started.
We provide detailed changes for each spinach release.
Be sure to read the CONTRIBUTING guidelines before reporting a new lettuce issue or open a pull request.
If you have any questions about the lettuce usage or want to share some information with the community, please go to one of the following places:
More resources:
- Javadoc
- Build status: Travis CI
- All versions: Maven Central
- Snapshots: Sonatype OSS Repository
Intro
Getting started
Advanced usage
- QueueListener API
- SocketAddress Supplier API
- Client options
- SSL Connections
- Unix Domain Sockets
- Connection Events
- Command Interfaces
- Stateful Connections
Integration and Extension
- Codecs
- CDI Support (future)
- Spring Support (future)
Internals