Show / Hide Table of Contents

Class JobQueue<TArgs>

Inheritance
object
JobQueue<TArgs>
Implements
IJobQueue<TArgs>
IRunnable
IDisposable
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.BackgroundJobs.RabbitMQ
Assembly: Volo.Abp.BackgroundJobs.RabbitMQ.dll
Syntax
public class JobQueue<TArgs> : IJobQueue<TArgs>, IRunnable, IDisposable
Type Parameters
Name Description
TArgs

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
Type Name Description
IOptions<AbpBackgroundJobOptions> backgroundJobOptions
IOptions<AbpRabbitMqBackgroundJobOptions> rabbitMqAbpBackgroundJobOptions
IChannelPool channelPool
IRabbitMqSerializer serializer
IBackgroundJobExecuter jobExecuter
IServiceScopeFactory serviceScopeFactory
IExceptionNotifier exceptionNotifier

Fields

SyncObj

Declaration
protected SemaphoreSlim SyncObj
Field Value
Type Description
SemaphoreSlim

Properties

AbpBackgroundJobOptions

Declaration
protected AbpBackgroundJobOptions AbpBackgroundJobOptions { get; }
Property Value
Type Description
AbpBackgroundJobOptions

AbpRabbitMqBackgroundJobOptions

Declaration
protected AbpRabbitMqBackgroundJobOptions AbpRabbitMqBackgroundJobOptions { get; }
Property Value
Type Description
AbpRabbitMqBackgroundJobOptions

ChannelAccessor

Declaration
protected IChannelAccessor? ChannelAccessor { get; }
Property Value
Type Description
IChannelAccessor

ChannelPool

Declaration
protected IChannelPool ChannelPool { get; }
Property Value
Type Description
IChannelPool

Consumer

Declaration
protected AsyncEventingBasicConsumer? Consumer { get; }
Property Value
Type Description
AsyncEventingBasicConsumer

ExceptionNotifier

Declaration
protected IExceptionNotifier ExceptionNotifier { get; }
Property Value
Type Description
IExceptionNotifier

IsDiposed

Declaration
protected bool IsDiposed { get; }
Property Value
Type Description
bool

JobConfiguration

Declaration
protected BackgroundJobConfiguration JobConfiguration { get; }
Property Value
Type Description
BackgroundJobConfiguration

JobExecuter

Declaration
protected IBackgroundJobExecuter JobExecuter { get; }
Property Value
Type Description
IBackgroundJobExecuter

Logger

Declaration
public ILogger<JobQueue<TArgs>> Logger { get; set; }
Property Value
Type Description
ILogger<JobQueue<TArgs>>

QueueConfiguration

Declaration
protected JobQueueConfiguration QueueConfiguration { get; }
Property Value
Type Description
JobQueueConfiguration

Serializer

Declaration
protected IRabbitMqSerializer Serializer { get; }
Property Value
Type Description
IRabbitMqSerializer

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, TimeSpan?)

Declaration
public virtual Task<string?> EnqueueAsync(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
Parameters
Type Name Description
TArgs args
BackgroundJobPriority priority
TimeSpan? delay
Returns
Type Description
Task<string>

EnsureInitializedAsync()

Declaration
protected virtual Task EnsureInitializedAsync()
Returns
Type Description
Task

GetOrCreateJobQueueConfiguration()

Declaration
protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration()
Returns
Type Description
JobQueueConfiguration

MessageReceived(object, BasicDeliverEventArgs)

Declaration
protected virtual Task MessageReceived(object sender, BasicDeliverEventArgs ea)
Parameters
Type Name Description
object sender
BasicDeliverEventArgs ea
Returns
Type Description
Task

PublishAsync(TArgs, BackgroundJobPriority, TimeSpan?)

Declaration
protected virtual Task PublishAsync(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
Parameters
Type Name Description
TArgs args
BackgroundJobPriority priority
TimeSpan? delay
Returns
Type Description
Task

StartAsync(CancellationToken)

Declaration
public virtual Task StartAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

StopAsync(CancellationToken)

Declaration
public virtual Task StopAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

Implements

IJobQueue<TArgs>
IRunnable
IDisposable

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform