Relaybus AMQP subscriber
Project description
relaybus-amqp (Python)
AMQP publisher and subscriber utilities for Relaybus.
Install
pip install relaybus-amqp
Example
from relaybus_amqp import (
AmqpPublisher,
AmqpPublisherConnectConfig,
AmqpSubscriber,
AmqpSubscriberConnectConfig,
)
from relaybus_core import OutgoingMessage
publisher = AmqpPublisher.connect(
AmqpPublisherConnectConfig(url="amqp://guest:guest@localhost:5672/")
)
publisher.publish("relaybus.demo", OutgoingMessage(topic="relaybus.demo", payload=b"hello"))
publisher.close()
subscriber = AmqpSubscriber.connect(
AmqpSubscriberConnectConfig(
url="amqp://guest:guest@localhost:5672/",
on_message=lambda msg: print(msg.topic, msg.payload),
)
)
subscriber.start("relaybus.demo")
subscriber.close()
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
relaybus_amqp-0.0.2.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relaybus_amqp-0.0.2.tar.gz.
File metadata
- Download URL: relaybus_amqp-0.0.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39bfb190709f03a3345900a01fbc6f8612cf5bc72c35e88d34ee41e6b51e2761
|
|
| MD5 |
e7accde3ee32b77f42087b4199813579
|
|
| BLAKE2b-256 |
1b51accf4061b0b4edfe9b75672b7ecde6837791632cb71ec68b65929d489434
|
File details
Details for the file relaybus_amqp-0.0.2-py3-none-any.whl.
File metadata
- Download URL: relaybus_amqp-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c0c0339149848e162b883e4187b7e076e36bc7e1a5894a511cfaf01ac9dda63
|
|
| MD5 |
9df6bae745baf659e36ff7a3ff221884
|
|
| BLAKE2b-256 |
cb0f8321e04ac8cb82c6b007953952b454ba3db4a4d0e1ae31562e9ca0ab9c9a
|