Rejected is a Python RabbitMQ Consumer Framework and Controller Daemon
Project description
Rejected
Rejected is an AMQP consumer daemon and message processing framework. It allows for rapid development of message processing consumers by handling all of the core functionality of communicating with RabbitMQ and management of consumer processes.
Rejected runs as a master process with multiple consumer configurations that are each run in an isolated process. It has the ability to collect statistical data from the consumer processes and report on it.
Features
- Async consumers built on
asyncio - Automatic exception handling including connection management and consumer restarting
- Smart consumer classes that automatically decode and deserialize message bodies based on message headers
- Concurrent message processing with
FunctionalConsumer - Metrics via statsd and/or Prometheus
- Built-in profiling of consumer code
- Avro schema support with file and HTTP schema registries
- YAML and TOML configuration file support
Installation
pip install rejected
For optional features:
pip install rejected[avro] # Avro datum serialization
pip install rejected[html] # HTML message body support
pip install rejected[msgpack] # MessagePack support
pip install rejected[prometheus] # Prometheus metrics exporter
pip install rejected[sentry] # Sentry error reporting
Documentation
Full documentation is available at https://gmr.github.io/rejected.
Example Consumer
import logging
import rejected
LOGGER = logging.getLogger(__name__)
class Test(rejected.Consumer):
async def process(self) -> None:
LOGGER.debug('In Test.process: %s', self.body)
For concurrent message processing, use FunctionalConsumer:
import logging
import rejected
LOGGER = logging.getLogger(__name__)
class Test(rejected.FunctionalConsumer):
async def process(self, ctx: rejected.ProcessingContext) -> None:
LOGGER.debug('Processing: %s', ctx.message.body)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 rejected-4.0.0a2.tar.gz.
File metadata
- Download URL: rejected-4.0.0a2.tar.gz
- Upload date:
- Size: 137.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2a460751b08d9ee72d501826a35849b7a896589d4462fcd91ae504b156acbea
|
|
| MD5 |
591f8e1ec667f007d9d5ec82b49495a2
|
|
| BLAKE2b-256 |
12f63c67d0593430b7391a63edf716da9201416077700db5b3e98f2b715e05ef
|
Provenance
The following attestation bundles were made for rejected-4.0.0a2.tar.gz:
Publisher:
deploy.yaml on gmr/rejected
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rejected-4.0.0a2.tar.gz -
Subject digest:
a2a460751b08d9ee72d501826a35849b7a896589d4462fcd91ae504b156acbea - Sigstore transparency entry: 1229206409
- Sigstore integration time:
-
Permalink:
gmr/rejected@34ffe5e145cd50e9e88aa59fa29b0ab218c4c927 -
Branch / Tag:
refs/tags/4.0.0a2 - Owner: https://github.com/gmr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@34ffe5e145cd50e9e88aa59fa29b0ab218c4c927 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rejected-4.0.0a2-py3-none-any.whl.
File metadata
- Download URL: rejected-4.0.0a2-py3-none-any.whl
- Upload date:
- Size: 49.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abaf2b1a3c7a18772f740187d2b8cbcc521f98d7931ee32eeb7564d941e15c26
|
|
| MD5 |
7622f033c560ff80825024c61d9b432a
|
|
| BLAKE2b-256 |
3daf2aef323fa6f8a52959a5a0089419ac043b7e724aa3aafbb4e29065642bb5
|
Provenance
The following attestation bundles were made for rejected-4.0.0a2-py3-none-any.whl:
Publisher:
deploy.yaml on gmr/rejected
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rejected-4.0.0a2-py3-none-any.whl -
Subject digest:
abaf2b1a3c7a18772f740187d2b8cbcc521f98d7931ee32eeb7564d941e15c26 - Sigstore transparency entry: 1229206488
- Sigstore integration time:
-
Permalink:
gmr/rejected@34ffe5e145cd50e9e88aa59fa29b0ab218c4c927 -
Branch / Tag:
refs/tags/4.0.0a2 - Owner: https://github.com/gmr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@34ffe5e145cd50e9e88aa59fa29b0ab218c4c927 -
Trigger Event:
release
-
Statement type: