Skip to content
Disque client for Erlang
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Erlang Disque client. Disque is an in-memory, distributed job queue.



git clone git://
cd edisque
erl -pa ebin/ deps/**/ebin/
{ok, C} = edisque:start_link().
edisque:add_job(C, <<"queue">>, <<"body">>, 0).
{ok, Resp} = edisque:get_job(C, [<<"queue">>]).
JobId = lists:nth(2, lists:nth(1, Resp)).
edisque:ack_job(C, [JobId]).

Host cycling

Every time edisque runs GETJOB, edisque updates statistics of the Disque nodes that are producing the jobs that edisque is consuming. When a number of jobs is consumed (default is 1000), it will check the statistics to see if it can connect to a better node, and will do so if possible.

For more information about this behaviour, check the Disque documentation.

To configure the number of jobs consumed in a cycle, start edisque with edisque:start_link(Hosts, Cycle), where Hosts is a list of tuples of the form {IP, Port} as in {"", 7711}, and Cycle is the number of jobs consumed before looking for a better client.

If Cycle is 0, this feature is disabled.

Running tests

To run the tests run make eunit.

In order to test cycling, it is expected to have two edisque nodes running in a cluster listening to 127.0.01:7711 and


Edisque uses eredis as base Redis client.

You can’t perform that action at this time.