This release is a pre-release and may not be stable for production use.
talus (noun) - ta·lus | ˈtā-ləs: a slope formed especially by an accumulation of rock debris; Occasional habitat of the pika.
A wrapper for connecting to RabbitMQ which constrains clients to a single purpose channel (producer or consumer) with healing for intermittent connectivity.
Features
Guided separation of connections for producers and consumers
Re-establish connections to the server when lost
Constrained interface to support simple produce / consume use cases for direct exchanges
Installation
pip install talus
Examples
Consumer with defaults for connection and retry
with DurableBlockingConsumerWrapper(consumer_queue='queue_name') as consumer:
for method, properties, body in consumer.consume_generator(auto_ack=True):
pass # DO Something with the message
Consumer specifying connection and retry data
with DurableBlockingConsumerWrapper(consumer_queue='queue_name',
rabbitmq_host="localhost",
rabbitmq_port5672,
rabbitmq_user='guest',
rabbitmq_pass='guest',
retry_delay=1,
retry_backoff=2,
retry_jitter=(1, 10),
retry_max_delay=300,
prefetch_count=1,
connection_name='consumer connection') as consumer:
for method, properties, body in consumer.consume_generator(auto_ack=True):
pass # DO Something with the message
Producer with defaults for connection and retry
with DurableBlockingProducerWrapper(producer_queue_bindings=[{"routing_key": "test.m", "bound_queue": "test.q"},],
publish_exchange='amq.direct') as producer:
producer.post('test.m', {'key': 'value'})
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file talus-0.1.2rc1.tar.gz.
File metadata
- Download URL: talus-0.1.2rc1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b43851cd7d1124db5fcf0c21cbf26b0eb32b18235cf25acb0574f2dd34ed5b2
|
|
| MD5 |
19e266e374f1f4d5ff45fefc4282cbad
|
|
| BLAKE2b-256 |
6f4f88341c3d278ab529bcfcdd4875d862a9e8641a1b8d2048250fcb7dd4fea8
|