Hangfire.Throttling - Attributes must go on interface rather then implementation?


#1

We have an ASP.NET Core API and hangfire service that uses a mix of AutoFac/Microsoft DI, using Hangfire with the standard Microsoft DI extensions it provides.

We’ve noticed that in the standard Hangfire attributes, like QueueAttribute, can be put on the class implementation and work correctly.

Testing with Hangfire.Throttling now, SlidingWindowAttribute was put on the class, Hangfire Enqueued a job using the interface, and no throttling occured. Putting the attribute on the interface, and throttling occured.

Is this intended? For projects that use an onion architecture, I don’t see a good way to use Hangfire.Throttling.