Skip to main content

Kombu Tramsport for Sakura Cloud SimpleMQ

Project description

Kombu Tramsport for Sakura Cloud SimpleMQ

Install

pip install git+https://github.com/chibiegg/kombu-sakura-simplemq

Quick overview

from kombu import transport, Connection, Queue

transport.TRANSPORT_ALIASES["sakura-simplemq"] = "kombu_sakura_simplemq.transport:Transport"

transport_options = {
    "api_key": "YOUR_SIMPLEMQ_API_KEY",
    "zone": "tk1b",
}

with Connection("sakura-simplemq://", transport_options=transport_options) as conn:
    queue_name = "somequeue"
    queue = Queue(queue_name)
    queue.maybe_bind(conn)
    queue.declare()

    # メッセージ送信
    producer = conn.Producer()
    producer.publish(
        body="Hello, custom Transport!",
        routing_key=queue_name,
    )

    def handle_message(body, message):
        print(f"Received message: {body}")
        message.ack()

    # メッセージ受信
    with conn.Consumer(queue, callbacks=[handle_message]):
        while True:
            conn.drain_events(timeout=2)

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

kombu_sakura_simplemq-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

kombu_sakura_simplemq-0.1.1-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kombu_sakura_simplemq-0.1.1.tar.gz.

File metadata

  • Download URL: kombu_sakura_simplemq-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for kombu_sakura_simplemq-0.1.1.tar.gz
Algorithm Hash digest
SHA256 78331b2d37bd844adb513886739e04a45a615bce48bde9ac2ce030271efee5f7
MD5 a8a74b8597c68c56e52ec1aea5d4716a
BLAKE2b-256 58858f9fe9ef276d67f7af452aedc71f26b9c04cc4642e320d1a950d455c2244

See more details on using hashes here.

Provenance

The following attestation bundles were made for kombu_sakura_simplemq-0.1.1.tar.gz:

Publisher: release.yml on chibiegg/kombu-sakura-simplemq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kombu_sakura_simplemq-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kombu_sakura_simplemq-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 22e4be8c1f9709c788f08ab984772528f69d72fd1fa748ecc705778e51b6b40d
MD5 ebf8caf9c5e511a08620603961760a7a
BLAKE2b-256 381245b11aacdc242a4c18906fd28ef9afb30cf7798133ae057220472adb6d07

See more details on using hashes here.

Provenance

The following attestation bundles were made for kombu_sakura_simplemq-0.1.1-py2.py3-none-any.whl:

Publisher: release.yml on chibiegg/kombu-sakura-simplemq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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