Class JobQueue<TArgs>
Inheritance
System.Object
JobQueue<TArgs>
Assembly: Volo.Abp.BackgroundJobs.RabbitMQ.dll
Syntax
public class JobQueue<TArgs> : object, 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
Type |
Description |
SemaphoreSlim |
|
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 EventingBasicConsumer Consumer { get; }
Property Value
Type |
Description |
EventingBasicConsumer |
|
ExceptionNotifier
Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
Type |
Description |
IExceptionNotifier |
|
IsDiposed
Declaration
protected bool IsDiposed { get; }
Property Value
Type |
Description |
System.Boolean |
|
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
Type |
Description |
ILogger<JobQueue<TArgs>> |
|
QueueConfiguration
Declaration
protected JobQueueConfiguration QueueConfiguration { get; }
Property Value
Serializer
Declaration
protected IRabbitMqSerializer Serializer { get; }
Property Value
ServiceScopeFactory
Declaration
protected IServiceScopeFactory ServiceScopeFactory { get; }
Property Value
Type |
Description |
IServiceScopeFactory |
|
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, Nullable<TimeSpan>)
Declaration
public virtual Task<string> EnqueueAsync(TArgs args, BackgroundJobPriority priority = default(BackgroundJobPriority), TimeSpan? delay = null)
Parameters
Returns
Type |
Description |
Task<System.String> |
|
EnsureInitializedAsync()
Declaration
protected virtual Task EnsureInitializedAsync()
Returns
GetOrCreateJobQueueConfiguration()
Declaration
protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration()
Returns
MessageReceived(Object, BasicDeliverEventArgs)
Declaration
protected virtual void MessageReceived(object sender, BasicDeliverEventArgs ea)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
BasicDeliverEventArgs |
ea |
|
PublishAsync(TArgs, BackgroundJobPriority, Nullable<TimeSpan>)
Declaration
protected virtual Task PublishAsync(TArgs args, BackgroundJobPriority priority = default(BackgroundJobPriority), TimeSpan? delay = null)
Parameters
Returns
StartAsync(CancellationToken)
Declaration
public virtual Task StartAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
StopAsync(CancellationToken)
Declaration
public virtual Task StopAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
Implements
IDisposable
Extension Methods