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.5.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.5.tar.gz.
File metadata
- Download URL: relaybus_amqp-0.0.5.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 |
eb0b0ad3f56231d0a16a5ed82b795b90598951a8c9c34f037336881fe66d0bb7
|
|
| MD5 |
44d7e85e6a59fd35acafdf5db9652d54
|
|
| BLAKE2b-256 |
d99e9f5d78029dc0e039922053f75c19521df022ac42751ead4c5f9369ed7349
|
File details
Details for the file relaybus_amqp-0.0.5-py3-none-any.whl.
File metadata
- Download URL: relaybus_amqp-0.0.5-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 |
e144ee1e784d4842864bee69d07ff7782763f681ba0ed6e904cbd7fd5e2bc9b0
|
|
| MD5 |
740559f16fdd44151ef2419a62c120dd
|
|
| BLAKE2b-256 |
53cbed0d9d062d471164d4976659f10bf3358531e13aca92ed0a1132747a45a2
|