UseActivator must be called before GlobalJobFilters.Filters.Add


#1

I ran into what I think is a bug whereby I have a separate server (.net core console) and client (asp.net core). Basically I’m using simple ContainerActivator on the server for DI and registering it with GlobalConfiguration.Configuration.UseActivator

I am also doing changing the retryattempts
GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 2);

What I found was if I change the retry attempt filter before I register my activator then the logging stops registering any events from the client (ie server side events still get logged, but exceptions from the jobs don’t get logged)

Moving the GlobalJobFilters.Filters.Add to after the UseActivator call seems to resolve the issue.