Mixins

Mixins provide additional functionality to Consumer classes without implementing the full consumer API.

class rejected.mixins.GarbageCollector(*args, **kwargs)[source]

Consumer mixin to periodically call gc.collect periodically in the on_finish method.

By default, gc.collect is invoked every 10,000 messages.

To configure frequency of collection, include a gc_collection_frequency setting in the consumer configuration.

collection_cycle

Call gc.collect every this many messages.

on_finish(exc=None)[source]

Used to initiate the garbage collection