Skip to main content

A file based serverless messaging queue

Project description

Dead Drop Messaging Queue

A file based serverless messaging queue

Requirements

| Python 2.6+ or 3+, should work with both. | Additional modules required: pyyaml | Additional modules recommended: beautifultable

Installation

::

pip install ddmq

Command-Line Usage

::

usage: ddmq <command> [<args>]

The available commands are:
view      List queues and number of messages
create    Create a queue
delete    Delete a queue
publish   Publish message to queue
consume   Consume message from queue
purge     Purge all messages from queue
json      Run a command packaged as a JSON object

For more info about the commands, run
ddmq <command> -h 

Command-line interface to Dead Drop Messaging Queue (ddmq).

positional arguments:
command        Subcommand to run

optional arguments:
-h, --help     show this help message and exit
-v, --version  print version

Python Module Usage

::

# imports both the broker and message module
import ddmq

# create the broker object and specify the path to the root directory
# adding create=True to tell it to create and initiate both the root 
# directory and queue directories if they don't already exist
b = broker('/path/to/rootdir', create=True)

# publish a message to the specified queue
b.publish(queue='queue_name', message='Hello World!')

# consume a single message from the specified queue
msg = b.consume(queue='queue_name')

# print the message contained
print(msg[0].message)

Use case

Since ddmq handles one file per message it will be much slower than other queues. A quick comparison with RabbitMQ showed that first publishing and then consuming 5000 messages is about 10x slower using ddmq (45s vs 4.5s). The point of ddmq is not performance, but to be used in environments where you can't run a server for some reason.

My own motivation for writing ddmq was to run on a shard HPC cluster where I could not reliably run a server process on the same node all the time. The mounted network storage system was available everywhere and all the time though. The throughput was expected to be really low, maybe <10 messages per day so performance was not the main focus.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ddmq-0.9.4.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddmq-0.9.4-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file ddmq-0.9.4.tar.gz.

File metadata

  • Download URL: ddmq-0.9.4.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for ddmq-0.9.4.tar.gz
Algorithm Hash digest
SHA256 12cbfe262399e0a95bda95126531436aaffe2abb9fed59f23c9f5d6b14925d2f
MD5 f9948fa9b9f7103b03809a5bbf5d0cfc
BLAKE2b-256 06dbeff7f5cb0b1d9bb5d349b4bb2a16f12d41c59e7d228b543d8a47d9cdc20e

See more details on using hashes here.

File details

Details for the file ddmq-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: ddmq-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for ddmq-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2577567d6ad794b765cbd5ef9b71cf2e1cdb4732ca85204d7b5f71415a70e988
MD5 97efa5514c1546ab907facbbc31f0ed8
BLAKE2b-256 8e1352cbeddf630f42e8f1903dcea246f226f61ed3c795df1aaf6f01ca74be3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page