Show / Hide Table of Contents

Class JobQueue<TArgs>

Inheritance
object
JobQueue<TArgs>
Implements
IJobQueue<TArgs>
IRunnable
System.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
Microsoft.Extensions.Options.IOptions<TOptions><AbpBackgroundJobOptions> backgroundJobOptions
Microsoft.Extensions.Options.IOptions<TOptions><AbpRabbitMqBackgroundJobOptions> rabbitMqAbpBackgroundJobOptions
IChannelPool channelPool
IRabbitMqSerializer serializer
IBackgroundJobExecuter jobExecuter
Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory
IExceptionNotifier exceptionNotifier

Fields

SyncObj

Declaration
protected SemaphoreSlim SyncObj
Field Value
Type Description
System.Threading.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
RabbitMQ.Client.Events.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
Microsoft.Extensions.Logging.ILogger<TCategoryName><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
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
Type Name Description
TArgs args
BackgroundJobPriority priority
System.TimeSpan? delay
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
Type Description
JobQueueConfiguration

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
Type Name Description
TArgs args
BackgroundJobPriority priority
System.TimeSpan? delay
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

IJobQueue<TArgs>
IRunnable
System.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>>)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In This Article
Back to top Powered by Volosoft