Skip to main content

Consumes XML messages from a RabbitMQ queue using a user defined class.

Project description

rabbitmq_consume project

The rabbitmq_consume project contains both the rabbitmq_consume package that provides a simple Consumer class for processing messages from a RabbitMQ queue, rmq-consume that is an executable that can be used to run that class and rmq-inject that cna be used to inject messages into the originating RabbitMQ queue.

rmq-consume executable

More details about the rmq-consume executable can be found using its help option

rmq-consume -h

The typical usage is the following:

rmq-consume <queue> <module>[.<class>]

where <queue> is that name of the RabbitMQ queue from which the XML messages should be consumed and <class> is a python class in the <module> python module that will actually process the messages. If the `. is omitted from the comand line, the class whose name matches the module name will be used.

The "consumption" class need to derived from the Consumption.Consumption as shown in the following trivial example.

from Consumption import Consumption

class TrivialConsumption(Consumption):

    def __init__(self,
                 properties,
                 body,
                 redelivered):

    def consume(self):
        pass

Most real implementations will save the properties, body and redelivered arguments for use in the consume method.

rmq-inject executable

More details about the rmq-inject executable can be found using its help option

rmq-inject -h

The typical usage is the following:

rmq-inject -l <queue>

This injects a "stop listening message" into the queue and when the consumer encounters this it will stop listening for an more messages and shut down.

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

rabbitmq_consume-1.0.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

rabbitmq_consume-1.0.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file rabbitmq_consume-1.0.0.tar.gz.

File metadata

  • Download URL: rabbitmq_consume-1.0.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

File hashes

Hashes for rabbitmq_consume-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ac86964d53dc262a0d1e2494af960cdaa2f185d82c129dbadd7baa66da2410b3
MD5 72bba92d2642fae3874198d4d2afecee
BLAKE2b-256 37ce1176b66598a8ce41d51431b343c492bf991efa3a515934afe0299b1ca80e

See more details on using hashes here.

File details

Details for the file rabbitmq_consume-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rabbitmq_consume-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

File hashes

Hashes for rabbitmq_consume-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c12641317169e05ec1442441ca6159380c5461f343193ee38697392f4f9eb02d
MD5 00bb528bcbe8d80175e07d2d7ff30c42
BLAKE2b-256 ddd39fce6cbed0db0e3cb39fa5dcd85e17d1dd6094584e8e4e2b20f8c362f032

See more details on using hashes here.

Supported by

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