HangfireIO / HangfireIO/Hangfire
Requeueing a job without QueueAttribute forgets entered queue
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
When a job that doesn't have a QueueAttribute on its handler gets re queued, it is placed in the default queue instead of its originator queue.
I use the following code to add a job:
```
foreach (var client in clients)
{
BackgroundJobClient.Create(x => x.AddUser(user), new EnqueuedState(client.QueueId));
}
```
This is probably since it's a little bit sneaky to work around the specific queue problem, but I'd preferably not put attributes on every handler that I'd like to be routed (in my case I'd like everything to be routed to specific queues).
Possibly related to the solution of #228
Contributor guide
Research direction
The report uses BackgroundJobClient.Create with EnqueuedState and a handler without QueueAttribute; start there and trace how a requeued job selects its queue. Reproduce the default-queue behavior and verify that requeueing preserves the originating queue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100