Interface RetryPolicyContext<TContext>
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
An initial context acquired to begin a retry filter
public interface RetryPolicyContext<TContext> : IDisposable where TContext : class
Type Parameters
TContext
- Inherited Members
Properties
Context
The context being managed by the retry policy
TContext Context { get; }
Property Value
- TContext
Methods
CanRetry(Exception, out RetryContext<TContext>)
Determines if the exception can be retried
bool CanRetry(Exception exception, out RetryContext<TContext> retryContext)
Parameters
exception
ExceptionThe exception that occurred
retryContext
RetryContext<TContext>The retry context for the retry
Returns
- bool
True if the task should be retried
Cancel()
Cancel any pending or subsequent retries
void Cancel()
RetryFaulted(Exception)
Called after the retry attempt has failed
Task RetryFaulted(Exception exception)
Parameters
exception
Exception