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.0a3.tar.gz (138.2 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.0a3-py3-none-any.whl (49.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rejected-4.0.0a3.tar.gz
  • Upload date:
  • Size: 138.2 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.0a3.tar.gz
Algorithm Hash digest
SHA256 d72ed3184dc98f9871dd5bb784e2d141f6c6dfcdc04d1d06a7924f893be73f00
MD5 2ac6d1a1ef08840284c790b7c2fe138b
BLAKE2b-256 615ee6359f53b2d9147cf589cc272bb5d14b25f2ea346e473a87a13229f48b43

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rejected-4.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 49.4 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.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 42fa3752f8a5b2c4479d58a977c64617bff1f1b3953be5507fd73c8d08e0b353
MD5 8b4658c61f18b0aa0b2f0cb350e677c8
BLAKE2b-256 3c256b12232eeb4ffaf7ac8b9ffcb37adb79c84c16567085e8f1cf81e66fec11

See more details on using hashes here.

Provenance

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