Need help with queued?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

scttnlsn
131 Stars 13 Forks MIT License 67 Commits 1 Opened issues

Description

Simple HTTP-based queue server

Services available

!
?

Need anything else?

Contributors list

# 133,109
Clojure
Clojure...
Ruby
job-que...
56 commits
# 249,798
s3
aws-s3
fuse
fuse-fi...
2 commits
# 29,834
elastic...
XML
golang
genetic...
1 commit
# 127,060
Svelte
vuejs
IPFS
Markdow...
1 commit
# 351,722
CSS
Shell
codeign...
codeign...
1 commit

queued

Simple HTTP-based queue server

Build Status

Getting Started

Install:

Ensure Go and LevelDB are installed and then run:

$ make
$ sudo make install

Run:

$ queued [options]

API

Enqueue:

$ curl -X POST http://localhost:5353/:queue -d 'foo'

Append the POSTed data to the end of the specified queue (note that queues are created on-the-fly). The

Location
header will point to the enqueued item and is of the form
http://localhost:5353/:queue/:id
.

Dequeue:

$ curl -X POST http://localhost:5353/:queue/dequeue

Dequeue the item currently on the head of the queue. Guaranteed not to return the same item twice unless a completion timeout is specified (see below). The

Location
header will point to the dequeued item and is of the form
http://localhost:5353/:queue/:id
. Queued message data is returned in the response body.

Dequeue optionally takes

wait
and/or
timeout
query string parameters:
  • wait=
    - block for the specified number of seconds or until there is an item to be read off the head of the queue
  • timeout=
    - if the item is not completed (see endpoint below) within the specified number of seconds, the item will automatically be re-enqueued (when no timeout is specified the item is automatically completed when dequeued)

Get:

$ curl -X GET http://localhost:5353/:queue/:id

Get a specific item. The header

X-Dequeued
will be
true
if the item is currently dequeued and waiting for completion.

Complete:

$ curl -X DELETE http://localhost:5353/:queue/:id

Complete the specified item and destroy it (note that only items dequeued with a timeout can be completed).

Stats:

$ curl -X GET http://localhost:5353/:queue

Get stats about a given queue.

CLI Options

  • -auth="" - HTTP basic auth password required for all requests
  • -db-path="./queued.db" - the directory in which queue items will be persisted (n/a for memory store)
  • -port=5353 - port on which to listen
  • -store=leveldb - the backend in which items will be stored (
    leveldb
    or
    memory
    )
  • -sync=true - boolean indicating whether data should be synced to disk after every write (n/a for memory store, see LevelDB's
    WriteOptions::sync
    )
  • -v - output the version number

Client Libraries

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.