HangfireIO / HangfireIO/Hangfire

AutomaticRetry by exception type

Open
#1,667 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Is it possible to instruct Hangfire to ( not ) retry jobs depending on the type of exception ?

An example would be a task that's part of state machine processing. If arrive at an unexpected inconsistent state where it's not possible to proceed, then throw a custom exception type. In this case, it would be expected that any retries would again encounter the inconsistent state and would fail identically. So retries are undesirable.

However retries are desirable for other types of exceptions such as timeouts, contention, timing, process end.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating Hangfire's AutomaticRetry handling and exception-filtering behavior, then define how exception types should select retry or no-retry behavior. Done means retryable failures still retry while the specified inconsistent-state exception does not.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.