Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 651 Bytes

File metadata and controls

36 lines (28 loc) · 651 Bytes

The simplest Message Queue server

This is only for testing purposes.

Prerequisites

  • Python 3

Run

Simply run it with a port,

On Linux:

./main.py [<port>]

Or on Windows:

python ./main.py [<port>]

Usage

Assuming it is run locally on port 8000 (default).

To push a new message:

curl -H 'Content-Type: text/html' -d '{"submission_id":5}' \
     localhost:8000/push/queue_name

Note: You can send anything in the body and it will be pushed into the queue as a string, regardless of the content-type header since it is simply ignored.

To pull a message:

curl localhost:8000/pull/queue_name