Skip to content

Separate exceptions logging and retries configuration #819

@EloiZalczer

Description

@EloiZalczer

Actors use the throws argument to configure expected errors.
This argument is then used in WorkerThread to format logging and in Retries to schedule or abort messages.

In my case, I want to be able to define expected exceptions, so that they aren't logged with a full stack trace, but I still need the messages to be retried when the actor fails.

Here are some possible solutions I can think of:

  • Add a new argument retry_on_expected, with a default value of False to avoid breaking retro-compatibility.
  • Use two different arguments to configure exceptions that should be logged as info and exceptions that should not trigger a retry (would break retro-compatibility).
  • Add a way to configure logging in the worker without changing Actor arguments.

Would you be open to this change ? I would be glad to open a PR with whichever solution is preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions