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 Python 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 TransactionConsumer
  • 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://rejected.readthedocs.io.

Example Consumer

from rejected import consumer
import logging

LOGGER = logging.getLogger(__name__)


class Test(consumer.Consumer):

    async def process(self) -> None:
        LOGGER.debug('In Test.process: %s', self.body)

For concurrent message processing, use TransactionConsumer:

from rejected import consumer, models
import logging

LOGGER = logging.getLogger(__name__)


class Test(consumer.TransactionConsumer):

    async def process(self, ctx: models.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.0a1.tar.gz (137.0 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.0a1-py3-none-any.whl (49.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rejected-4.0.0a1.tar.gz
  • Upload date:
  • Size: 137.0 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.0a1.tar.gz
Algorithm Hash digest
SHA256 b7f9b1188308052c1604c21b01444638747fb2e0aefa6d2cc59dff0a632a1f93
MD5 d0500f1989e9c67de36152e2f71b3139
BLAKE2b-256 c63b6f980ee1aad94668cf451e56154918970fc481494ecaa4451549a55f1baa

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rejected-4.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 49.0 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.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba0ba3f4d5e98216f78a9015be33cb1fc448b664bfb529b875f5df9ca8a8b5f2
MD5 15b8cf5de126f8f7aa3fbe109ea0d817
BLAKE2b-256 2dc7e143c4eb5085c27c9dabfdd39de9a46af8b319787e888f4cd9220b55bb5c

See more details on using hashes here.

Provenance

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