Hey All,
I have a routing slip with a couple of activities.
These need to get resovled out of an autofac container.
Each activity has individual retry policies.
This currently does not seem to be supported? The autofac extension do not offer access to the configurator.
I have grabbed the code from the autofac extension and added the retry poliocy to the endpoint specification (see below)
This works as expected - I am just not sure if this is best-practice and/if I might be in for a world of hurt when this goes to production.
I can send a PR with an override to the autofac extensions ? Or am i just doing this wrong.
Thanks
HW
// Autofac
builder.RegisterType<SendExternalOneActivity>();
// Bus Config
sbc.ReceiveEndpoint(host, executeSendExternalOneEndpoint, e =>
context.Resolve<ILifetimeScope>(), "execute-SendExternalOne-activity");
var specification = new ExecuteActivityHostSpecification<SendExternalOneActivity, SendExternalOneActivityArguments>(
factory, compensateSendExternalOneEndpoint);
specification.UseRetry(configurator => configurator.Immediate(5));
e.AddEndpointSpecification(specification);
});