Class JobQueue<TArgs>
Inheritance
object
JobQueue<TArgs>
Implements
System.IDisposable
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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
| Type |
Description |
| System.Threading.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 AsyncEventingBasicConsumer Consumer { get; }
Property Value
| Type |
Description |
| RabbitMQ.Client.Events.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
| Type |
Description |
| Microsoft.Extensions.Logging.ILogger<TCategoryName><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 |
| Microsoft.Extensions.DependencyInjection.IServiceScopeFactory |
|
Methods
CheckDisposed()
Declaration
protected void CheckDisposed()
CreateBasicPropertiesToPublish()
Declaration
protected virtual IBasicProperties CreateBasicPropertiesToPublish()
Returns
| Type |
Description |
| RabbitMQ.Client.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
| Type |
Description |
| System.Threading.Tasks.Task<TResult><string> |
|
EnsureInitializedAsync()
Declaration
protected virtual Task EnsureInitializedAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
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 |
|
| RabbitMQ.Client.Events.BasicDeliverEventArgs |
ea |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
PublishAsync(TArgs, BackgroundJobPriority, TimeSpan?)
Declaration
protected virtual Task PublishAsync(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
StartAsync(CancellationToken)
Declaration
public virtual Task StartAsync(CancellationToken cancellationToken = default)
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
StopAsync(CancellationToken)
Declaration
public virtual Task StopAsync(CancellationToken cancellationToken = default)
Parameters
| Type |
Name |
Description |
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
System.IDisposable
Extension Methods