Skip to main content

Utility package for working with rabbitmq

Project description

Базовое API для работы с RabbitMQ

BaseConsumer - базовый потребитель очереди сообщений
Publisher - базовый издатель очереди сообщений
ReplyToConsumer - reply to потребитель

Python modules

mq_misc.publish

python -m mq_misc.publish  -h

usage: __main__.py [-h] [--message MESSAGE] [--message-file MESSAGE_FILE] --amqp-url AMQP_URL --queue QUEUE [--exchange EXCHANGE] [--exchange_type EXCHANGE_TYPE] [--routing_key ROUTING_KEY]

If an arg is specified in more than one place, then commandline values override environment variables which override defaults.

optional arguments:
  -h, --help            show this help message and exit
  --message MESSAGE     The message being sent [env var: RMQ_MESSAGE] (default: None)
  --message-file MESSAGE_FILE
                        File with the message [env var: RMQ_MESSAGE_FILE] (default: None)

Rabbit MQ options:
  --amqp-url AMQP_URL   URL to use to connect to the rabbitmq [env var: RMQ_AMQP_URL] (default: None)
  --queue QUEUE         Queue to use to connect to the rabbitmq [env var: RMQ_QUEUE] (default: None)
  --exchange EXCHANGE   Exchange to use to connect to the rabbitmq [env var: RMQ_EXCHANGE] (default: None)
  --exchange_type EXCHANGE_TYPE
                        Exchange type to use to connect to the rabbitmq [env var: RMQ_EXCHANGE_TYPE] (default: direct)
  --routing_key ROUTING_KEY
                        Routing key for publish message [env var: RMQ_ROUTING_KEY] (default: None)

python -m mq_misc.publish --amqp-url "amqp://guest:guest@localhost:5672/" --exchange "exchange_1" --exchange_type "topic" --routing_key "log.error" --message-file "message.json"

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

mq-misc-0.0.4.tar.gz (10.4 kB view hashes)

Uploaded Source

Built Distribution

mq_misc-0.0.4-py3-none-any.whl (10.4 kB view hashes)

Uploaded Python 3

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