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.0b1.tar.gz (154.3 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.0b1-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

Details for the file rejected-4.0.0b1.tar.gz.

File metadata

  • Download URL: rejected-4.0.0b1.tar.gz
  • Upload date:
  • Size: 154.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rejected-4.0.0b1.tar.gz
Algorithm Hash digest
SHA256 014ae5745b26e57eaf471468e033e006a5485cb35e6aa472cafbd18c49913616
MD5 b2a903051dd21284259e311be9bfb2d2
BLAKE2b-256 c9acad8d62dc7957b9a79b6a304752107b500a62859a2b7817fee8eae23f37bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rejected-4.0.0b1.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.0b1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for rejected-4.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d4d3e9575e5b076b8fee16e5e93686edaa1aa2a0aeb6af581dcbdfd6d3648da
MD5 beb1a634fd064987de26caca409283e6
BLAKE2b-256 13ec09ee8c7650bbf0d3fb24967e448cb262b71fed8c9ca429262e39af88593e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rejected-4.0.0b1-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