Class JobQueue<TArgs>
Inheritance
JobQueue<TArgs>
Assembly: Volo.Abp.BackgroundJobs.RabbitMQ.dll
Syntax
public class JobQueue<TArgs> : IJobQueue<TArgs>, IRunnable, IDisposable
Type Parameters
Constructors
JobQueue(IOptions<AbpBackgroundJobOptions>, IOptions<AbpRabbitMqBackgroundJobOptions>, IChannelPool, IRabbitMqSerializer, IBackgroundJobExecuter, IServiceScopeFactory, IExceptionNotifier)
Declaration
public JobQueue(IOptions<AbpBackgroundJobOptions> backgroundJobOptions, IOptions<AbpRabbitMqBackgroundJobOptions> rabbitMqAbpBackgroundJobOptions, IChannelPool channelPool, IRabbitMqSerializer serializer, IBackgroundJobExecuter jobExecuter, IServiceScopeFactory serviceScopeFactory, IExceptionNotifier exceptionNotifier)
Parameters
Fields
SyncObj
Declaration
protected SemaphoreSlim SyncObj
Field Value
Properties
AbpBackgroundJobOptions
Declaration
protected AbpBackgroundJobOptions AbpBackgroundJobOptions { get; }
Property Value
AbpRabbitMqBackgroundJobOptions
Declaration
protected AbpRabbitMqBackgroundJobOptions AbpRabbitMqBackgroundJobOptions { get; }
Property Value
ChannelAccessor
Declaration
protected IChannelAccessor? ChannelAccessor { get; }
Property Value
ChannelPool
Declaration
protected IChannelPool ChannelPool { get; }
Property Value
Consumer
Declaration
protected AsyncEventingBasicConsumer? Consumer { get; }
Property Value
Type |
Description |
AsyncEventingBasicConsumer |
|
ExceptionNotifier
Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
IsDiposed
Declaration
protected bool IsDiposed { get; }
Property Value
JobConfiguration
Declaration
protected BackgroundJobConfiguration JobConfiguration { get; }
Property Value
JobExecuter
Declaration
protected IBackgroundJobExecuter JobExecuter { get; }
Property Value
Logger
Declaration
public ILogger<JobQueue<TArgs>> Logger { get; set; }
Property Value
QueueConfiguration
Declaration
protected JobQueueConfiguration QueueConfiguration { get; }
Property Value
Serializer
Declaration
protected IRabbitMqSerializer Serializer { get; }
Property Value
ServiceScopeFactory
Declaration
protected IServiceScopeFactory ServiceScopeFactory { get; }
Property Value
Methods
CheckDisposed()
Declaration
protected void CheckDisposed()
CreateBasicPropertiesToPublish()
Declaration
protected virtual IBasicProperties CreateBasicPropertiesToPublish()
Returns
Type |
Description |
IBasicProperties |
|
Dispose()
Declaration
public virtual void Dispose()
EnqueueAsync(TArgs, BackgroundJobPriority, TimeSpan?)
Declaration
public virtual Task<string?> EnqueueAsync(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
Parameters
Returns
EnsureInitializedAsync()
Declaration
protected virtual Task EnsureInitializedAsync()
Returns
GetOrCreateJobQueueConfiguration()
Declaration
protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration()
Returns
MessageReceived(object, BasicDeliverEventArgs)
Declaration
protected virtual Task MessageReceived(object sender, BasicDeliverEventArgs ea)
Parameters
Type |
Name |
Description |
object |
sender |
|
BasicDeliverEventArgs |
ea |
|
Returns
PublishAsync(TArgs, BackgroundJobPriority, TimeSpan?)
Declaration
protected virtual Task PublishAsync(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
Parameters
Returns
StartAsync(CancellationToken)
Declaration
public virtual Task StartAsync(CancellationToken cancellationToken = default)
Parameters
Returns
StopAsync(CancellationToken)
Declaration
public virtual Task StopAsync(CancellationToken cancellationToken = default)
Parameters
Returns
Implements
Extension Methods