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.4.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.4.tar.gz.
File metadata
- Download URL: relaybus_amqp-0.0.4.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 |
d05ef51ea1dcc1e8456b98901a5f2b84ec6ceb2508b1cd56d9b1257bc2f9bbe6
|
|
| MD5 |
acfa78b04b8b6d3b291cd310c73a7f3a
|
|
| BLAKE2b-256 |
76c49125d0c574da8a72291515dae1cd3d3149d8e348d3ebb1057b1b1fa3d397
|
File details
Details for the file relaybus_amqp-0.0.4-py3-none-any.whl.
File metadata
- Download URL: relaybus_amqp-0.0.4-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 |
c8425f14fb6a5a3a4f602f1c6e76c3c613f5e3be3a09cea6d115efe489ec8df3
|
|
| MD5 |
823a8ca3ffc8b8a35d3356c16fd74d73
|
|
| BLAKE2b-256 |
a334b686d980606a06770e45509d4d56098e6bbaa3b980500ec5e5cb405efee3
|