Skip to main content

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.

Version License

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

rejected-4.0.0a2.tar.gz (137.4 kB view details)

Uploaded Source

Built Distribution

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

rejected-4.0.0a2-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

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

Hashes for rejected-4.0.0a2.tar.gz
Algorithm Hash digest
SHA256 a2a460751b08d9ee72d501826a35849b7a896589d4462fcd91ae504b156acbea
MD5 591f8e1ec667f007d9d5ec82b49495a2
BLAKE2b-256 12f63c67d0593430b7391a63edf716da9201416077700db5b3e98f2b715e05ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for rejected-4.0.0a2.tar.gz:

Publisher: deploy.yaml on gmr/rejected

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

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

Hashes for rejected-4.0.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 abaf2b1a3c7a18772f740187d2b8cbcc521f98d7931ee32eeb7564d941e15c26
MD5 7622f033c560ff80825024c61d9b432a
BLAKE2b-256 3daf2aef323fa6f8a52959a5a0089419ac043b7e724aa3aafbb4e29065642bb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rejected-4.0.0a2-py3-none-any.whl:

Publisher: deploy.yaml on gmr/rejected

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