In the Sample-Courier app if I add UseRetry when registering 'ValidateActivity' and then throw exception in Execute method of ValidateActivity it never calls Execute again.
This is the changed code for registering endpoint:
x.ReceiveEndpoint(host, ConfigurationManager.AppSettings["ValidateActivityQueue"], e =>
{
e.UseRetry(c =>
{
c.Interval(5, TimeSpan.FromSeconds(3));
});
e.PrefetchCount = 100;
e.ExecuteActivityHost<ValidateActivity, ValidateArguments>(
DefaultConstructorExecuteActivityFactory<ValidateActivity, ValidateArguments>.ExecuteFactory);
});
Should this work as I described or is it intended to work differently. Should the exception thrown in Execute method of an activity that has retry policy automatically call Compensate of activity that was executed before in the routing slip or should that be done if the last retry fails?
Thank you