WeenSpace RabbitMQ Client
A powerful Python RabbitMQ client for AMQP 1.0 protocol, designed for event-driven microservices architecture.
✨ Features
- 🔐 Authentication: OAuth2, TLS/SSL, Basic Auth
- 📬 Queue Types: Classic, Quorum, Stream queues
- ☠️ Dead Letter Queues: Built-in DLQ support with configurable strategies
- ⚡ Priority Queues: Native priority queue support
- 🔄 Auto Reconnection: Configurable recovery with exponential backoff
- 🔀 All Exchange Types: Direct, Fanout, Topic, Headers
- 🚀 Async Support: Native asyncio integration
- 📊 Streams: RabbitMQ Streams with filtering support
📦 Installation
pip install weenspace-queue
🚀 Quick Start
Unified Publisher/Consumer
from weenspace_queue import Message, QueueClient, QueueSpecification
client = QueueClient("RABBITMQ", uri="amqp://guest:guest@localhost:5672/")
queue = client.declare_queue(QueueSpecification(name="my-queue"))
client.publish(queue, Message(body=b"Hello WeenSpace!"))
def on_message(message: Message) -> None:
print(f"Received: {message.body}")
message.accept()
client.consume(queue, handler=on_message, prefetch=10)
Install AWS support with pip install "weenspace-queue[aws]".
AWS SQS and SNS
See examples/aws/sqs.py for direct SQS publishing and examples/aws/sns.py for an SNS-to-SQS workflow with routing-key filters.
Async Support
import asyncio
from weenspace_queue import AsyncQueueClient, Message, QueueSpecification
async def main():
async with AsyncQueueClient("RABBITMQ", uri="amqp://localhost:5672/") as client:
queue = await client.declare_queue(QueueSpecification(name="my-queue"))
await client.publish(queue, Message(body=b"Async message!"))
asyncio.run(main())
RabbitMQ authentication
from weenspace_queue import QueueClient
client = QueueClient(
"RABBITMQ",
uri="amqp://localhost:5672/",
oauth2_options=your_oauth_options
)
TLS/SSL Connection
from weenspace_queue import QueueClient
client = QueueClient(
"RABBITMQ",
uri="amqps://localhost:5671/",
ssl_context=your_ssl_context
)
📚 Documentation
See examples folder for more detailed usage examples.
🔄 Migration from python-rabbitmq
# Old (python-rabbitmq)
# from python_rabbitmq import RabbitMQ
# New (weenspace-queue)
from weenspace_queue import QueueClient
📋 Requirements
- Python 3.13+
- RabbitMQ 4.x with AMQP 1.0 plugin enabled
📄 License
MIT License - Based on the official RabbitMQ AMQP Python Client
🙏 Credits
This library is based on the official RabbitMQ AMQP 1.0 Python client by the RabbitMQ team.
Metadata
Release files for weenspace-queue 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| weenspace_queue-0.1.3.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| weenspace_queue-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / weenspace_queue-0.1.3.tar.gz
| Download URL | weenspace_queue-0.1.3.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f16f3c801e257d30991551c546e6b45d6d1ae4a99eaa82a8a1355c625d19f71
|
|
BLAKE2b-256 checksum How to use checksums |
3f9d822165462491c6d6478146129c7c9f8fd0f32c4cdb172dae519b7614c96d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / weenspace_queue-0.1.3-py3-none-any.whl
| Download URL | weenspace_queue-0.1.3-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5f68f4c3c2c0dd8738a58b9f3187b14cda310f180c62af9c0d853073288b71b
|
|
BLAKE2b-256 checksum How to use checksums |
bfec19c98d43b59f531b2877faebd2338446fef53d7d9fecd2d6ac9d13d82247
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|