Skip to content

Allow retry settings to be set on a consumer level, rather than global or per-topic #60

@stefan-cardnell-rh

Description

@stefan-cardnell-rh

Retry settings can only be defined on a global or per-topic level. It would be useful to allow Consumer classes themselves to define their own retry settings that apply to all topics they are consuming from, which applies over the global-level config. E:g:

@kafka.consumers()
class MyConsumer(Consumer):
    topics = Topics(
        MyTopic1(),
        MyTopic2(),
    )

    retry_settings = RetrySettings(max_retries=3, delay=10, use_offset_tracker=False)

    config = {
        "group.id": "my-consumer",
        "auto.offset.reset": "earliest",
        "enable.auto.offset.store": False,
    }

This is useful for when we define >1 consumers and we don't want to use the global retry config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions