Skip to main content

Messaging abstractions for publisher/consumer workflows with optional RabbitMQ and Kafka extras

Project description

csrd.message

Transport-agnostic message abstractions for publish/consume workflows.

Why this package exists

  • Provide a stable API for messaging behavior independent of broker choice
  • Enable optional broker installs with extras (rabbit, kafka)
  • Keep service code portable across RabbitMQ and Kafka backends

Installation

# Core abstractions only
uv add csrd-message

# RabbitMQ support
uv add 'csrd-message[rabbit]'

# Kafka support
uv add 'csrd-message[kafka]'

# Both brokers
uv add 'csrd-message[all]'

Important extras note

Python extras are part of the same PyPI project, not a separate project.

  • csrd-message and csrd-message[rabbit] resolve to the same package name (csrd-message)
  • The extra only adds optional dependencies declared by this package
  • Extras do not create new package names on PyPI

Initial API surface

  • Message - immutable message envelope
  • MessagePublisher - protocol for publishing messages
  • MessageConsumer - protocol for consuming messages
  • Acknowledgement - ack/retry/reject semantics

Quick example

from csrd.message import Acknowledgement, Message, MessagePublisher


class InMemoryPublisher:
    async def publish(self, message: Message) -> None:
        print(message.topic, message.payload)


async def send(publisher: MessagePublisher) -> None:
    await publisher.publish(Message(topic="orders.created", payload={"order_id": "o-1"}))

Status

This is a v0 skeleton package to reserve naming and establish contracts. Concrete RabbitMQ/Kafka adapters are planned follow-up work, while the shared envelope/protocol API is considered stable for early adopters.

Project details


Release history Release notifications | RSS feed

This version

0.3.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csrd_message-0.3.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

csrd_message-0.3.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file csrd_message-0.3.2.tar.gz.

File metadata

  • Download URL: csrd_message-0.3.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for csrd_message-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c6a9979d52ae19288c9c90f6a9a69b022fcc0211457672a2f13ace31ca92e50e
MD5 2aa501b9b0565df2304e831614b1f42d
BLAKE2b-256 cc6a3c739379f024b3bc76c656846eca927be0cf1d9bfaf59b7b3a13a40f82da

See more details on using hashes here.

Provenance

The following attestation bundles were made for csrd_message-0.3.2.tar.gz:

Publisher: release.yml on csrd-api/fastapi-common

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

File details

Details for the file csrd_message-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: csrd_message-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for csrd_message-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31ee48a6f289dc0fe6f44c25e3e72d5250e9e5ab2aa3cc379581f794faaa51b5
MD5 c19d74e5a96c80511bfe9696c8f39542
BLAKE2b-256 5c3482db5d37651171bd7f9ada2741d266a517db73a068e81237e68923c530a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for csrd_message-0.3.2-py3-none-any.whl:

Publisher: release.yml on csrd-api/fastapi-common

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