Class DeferredMessageRedeliveryJob
- Namespace
- Integrations.Infrastructure.Messaging.Redelivery
- Assembly
- Integrations.Infrastructure.dll
Sends deferred messages that are due back to the queue they came from. The send goes through the transactional outbox together with deleting the row, so a message is never lost or sent twice by this job.
public sealed class DeferredMessageRedeliveryJob : IScheduledJob
- Inheritance
-
DeferredMessageRedeliveryJob
- Implements
- Inherited Members
Constructors
DeferredMessageRedeliveryJob(AppDbContext, ISendEndpointProvider, BusinessClock, IOptions<MessagingOptions>, ILogger<DeferredMessageRedeliveryJob>)
Sends deferred messages that are due back to the queue they came from. The send goes through the transactional outbox together with deleting the row, so a message is never lost or sent twice by this job.
public DeferredMessageRedeliveryJob(AppDbContext db, ISendEndpointProvider sendEndpoints, BusinessClock clock, IOptions<MessagingOptions> options, ILogger<DeferredMessageRedeliveryJob> logger)
Parameters
dbAppDbContextsendEndpointsISendEndpointProviderclockBusinessClockoptionsIOptions<MessagingOptions>loggerILogger<DeferredMessageRedeliveryJob>
Properties
Interval
Time between runs.
public TimeSpan Interval { get; }
Property Value
Name
Unique job name, used in logs, metrics and the advisory lock.
public string Name { get; }
Property Value
Methods
RunAsync(CancellationToken)
Runs once. Only one replica runs a job at a time.
public Task RunAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken