Skip to main content

AMQP Client for minty project

Project description

AMQP Consumer service framework.

Getting started

Main:

def main():
    amqp = AMQPLoader(
        domains=[insert_domains_here],
        command_wrapper_middleware=[insert_wrapper_classes_here],
        config_path="config.conf",
    )
    amqp.start_client()

Create consumer:

from minty_amqp.consumer import BaseConsumer

class ConsumerPrint(BaseConsumer):
  def __call__(self, message):
      print("Message:", message.body, "consumer_touch")
      message.ack()

package.conf example:

<amqp>
  url = 'http://0.0.0.0:5672'
  <consumer_settings>
        routing_keys = "zsnl.v2.*.*"
        queue_name = "legacy_logging_queue_test"
        exchange  =  "minty_exchange"
        qos_prefetching =  1
        consumer_class = "zsnl_amqp_consumers.consumers.LegacyLoggingConsumer"
        number_of_channels = 1
        <dead_letter_exchange>
          exchange = "minty_retry_exchange"
          retry_time_ms = 10000
        </dead_letter_exchange>
  </consumer_settings>
</amqp>

note: dead_letter_exchange config is optional

More documentation

Please see the generated documentation via CI for more information about this module and how to contribute in our online documentation. Open index.html when you get there: https://gitlab.com/minty-python/minty_amqp/-/jobs/artifacts/master/browse/tmp/docs?job=qa

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository

License

Copyright (c) 2018, Minty Team and all persons listed in CONTRIBUTORS

This project is licensed under the EUPL, v1.2. See the EUPL-1.2.txt file for details.

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

minty_amqp-2.0.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

minty_amqp-2.0.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file minty_amqp-2.0.2.tar.gz.

File metadata

  • Download URL: minty_amqp-2.0.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for minty_amqp-2.0.2.tar.gz
Algorithm Hash digest
SHA256 b440cf4e647dcb99bcabb41c453793678ebb5bfbb86e3e079d76ae6047655220
MD5 892ce7ea1d72d7e7d55c699482c6f637
BLAKE2b-256 db54357f83c27fa24db21c0e610992516964c799363a376b05046b58c8ebb82c

See more details on using hashes here.

File details

Details for the file minty_amqp-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: minty_amqp-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for minty_amqp-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d2f16bf8620cdba7f858cca6499dfd2a4089be71abb9d70219cda00e1c9ae71
MD5 21cb8c9b9613a88f6b93459a60fbc14a
BLAKE2b-256 6ef82494920d9e5b1ce8078fcaa8afb31686461f2bf9d07ef6d2d03d2d2aae7c

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