Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relaybus_amqp-0.0.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

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

Hashes for relaybus_amqp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 39bfb190709f03a3345900a01fbc6f8612cf5bc72c35e88d34ee41e6b51e2761
MD5 e7accde3ee32b77f42087b4199813579
BLAKE2b-256 1b51accf4061b0b4edfe9b75672b7ecde6837791632cb71ec68b65929d489434

See more details on using hashes here.

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

Hashes for relaybus_amqp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0c0339149848e162b883e4187b7e076e36bc7e1a5894a511cfaf01ac9dda63
MD5 9df6bae745baf659e36ff7a3ff221884
BLAKE2b-256 cb0f8321e04ac8cb82c6b007953952b454ba3db4a4d0e1ae31562e9ca0ab9c9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page