Skip to main content

Micro library to spin up AMQP shoveling with transforms

Project description

AMQPEz

Personal library for spinning up quick AMQP shoveling applications, which allows for mid-transit transforms, contrary to rabbitmq-shovel. See this Example.

Install

Simply run

pip3 install AMQPEz

Basics

Essentially you build your configuration

conf = AMQPEzConfigBuilder() \
        .add_connection_params("localhost") \
        .add_basic_credentials("guest", "guest") \
        .add_exchange("test_exchange") \
        .add_queue('test_queue') \
        .add_serializers(serialize, deserialize) \
        .add_task(lambda x: x+5) \
        .add_qos(1) \
        .build() 

And start your shovel, which runs the specified task (here we add 5).

amqpez = AMQPEz(conf)
try:
    amqpez.start()
except KeyboardInterrupt:
    amqpez.stop()

The consumer is quite similar to a very standard pika async consumer. It will include ISID tracking to tackle publish network timeouts in a future update. This also works seemlessly with protobuf, since you essentially plug all serialization.

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

AMQPEz-1.0.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

AMQPEz-1.0.0-py3-none-any.whl (4.7 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