|  |  |  | @ -24,8 +24,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ | 
			
		
	
		
			
				
					|  |  |  |  |          | 
			
		
	
		
			
				
					|  |  |  |  |         public ILogger<JobQueue<TArgs>> Logger { get; set; } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         protected BackgroundJobOptions BackgroundJobOptions { get; } | 
			
		
	
		
			
				
					|  |  |  |  |         protected RabbitMqBackgroundJobOptions RabbitMqBackgroundJobOptions { get; } | 
			
		
	
		
			
				
					|  |  |  |  |         protected AbpBackgroundJobOptions AbpBackgroundJobOptions { get; } | 
			
		
	
		
			
				
					|  |  |  |  |         protected AbpRabbitMqBackgroundJobOptions AbpRabbitMqBackgroundJobOptions { get; } | 
			
		
	
		
			
				
					|  |  |  |  |         protected IChannelPool ChannelPool { get; } | 
			
		
	
		
			
				
					|  |  |  |  |         protected IRabbitMqSerializer Serializer { get; } | 
			
		
	
		
			
				
					|  |  |  |  |         protected IBackgroundJobExecuter JobExecuter { get; } | 
			
		
	
	
		
			
				
					|  |  |  | @ -35,21 +35,21 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ | 
			
		
	
		
			
				
					|  |  |  |  |         protected bool IsDiposed { get; private set; } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         public JobQueue( | 
			
		
	
		
			
				
					|  |  |  |  |             IOptions<BackgroundJobOptions> backgroundJobOptions, | 
			
		
	
		
			
				
					|  |  |  |  |             IOptions<RabbitMqBackgroundJobOptions> rabbitMqBackgroundJobOptions, | 
			
		
	
		
			
				
					|  |  |  |  |             IOptions<AbpBackgroundJobOptions> backgroundJobOptions, | 
			
		
	
		
			
				
					|  |  |  |  |             IOptions<AbpRabbitMqBackgroundJobOptions> rabbitMqAbpBackgroundJobOptions, | 
			
		
	
		
			
				
					|  |  |  |  |             IChannelPool channelPool, | 
			
		
	
		
			
				
					|  |  |  |  |             IRabbitMqSerializer serializer, | 
			
		
	
		
			
				
					|  |  |  |  |             IBackgroundJobExecuter jobExecuter, | 
			
		
	
		
			
				
					|  |  |  |  |             IServiceScopeFactory serviceScopeFactory) | 
			
		
	
		
			
				
					|  |  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |  |             BackgroundJobOptions = backgroundJobOptions.Value; | 
			
		
	
		
			
				
					|  |  |  |  |             RabbitMqBackgroundJobOptions = rabbitMqBackgroundJobOptions.Value; | 
			
		
	
		
			
				
					|  |  |  |  |             AbpBackgroundJobOptions = backgroundJobOptions.Value; | 
			
		
	
		
			
				
					|  |  |  |  |             AbpRabbitMqBackgroundJobOptions = rabbitMqAbpBackgroundJobOptions.Value; | 
			
		
	
		
			
				
					|  |  |  |  |             Serializer = serializer; | 
			
		
	
		
			
				
					|  |  |  |  |             JobExecuter = jobExecuter; | 
			
		
	
		
			
				
					|  |  |  |  |             ServiceScopeFactory = serviceScopeFactory; | 
			
		
	
		
			
				
					|  |  |  |  |             ChannelPool = channelPool; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             JobConfiguration = BackgroundJobOptions.GetJob(typeof(TArgs)); | 
			
		
	
		
			
				
					|  |  |  |  |             JobConfiguration = AbpBackgroundJobOptions.GetJob(typeof(TArgs)); | 
			
		
	
		
			
				
					|  |  |  |  |             QueueConfiguration = GetOrCreateJobQueueConfiguration(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             Logger = NullLogger<JobQueue<TArgs>>.Instance; | 
			
		
	
	
		
			
				
					|  |  |  | @ -57,10 +57,10 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         protected virtual JobQueueConfiguration GetOrCreateJobQueueConfiguration() | 
			
		
	
		
			
				
					|  |  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |  |             return RabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ?? | 
			
		
	
		
			
				
					|  |  |  |  |             return AbpRabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ?? | 
			
		
	
		
			
				
					|  |  |  |  |                    new JobQueueConfiguration( | 
			
		
	
		
			
				
					|  |  |  |  |                        typeof(TArgs), | 
			
		
	
		
			
				
					|  |  |  |  |                        RabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName | 
			
		
	
		
			
				
					|  |  |  |  |                        AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName | 
			
		
	
		
			
				
					|  |  |  |  |                    ); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -85,7 +85,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ | 
			
		
	
		
			
				
					|  |  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |  |             CheckDisposed(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if (!BackgroundJobOptions.IsJobExecutionEnabled) | 
			
		
	
		
			
				
					|  |  |  |  |             if (!AbpBackgroundJobOptions.IsJobExecutionEnabled) | 
			
		
	
		
			
				
					|  |  |  |  |             { | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
	
		
			
				
					|  |  |  | @ -129,7 +129,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ | 
			
		
	
		
			
				
					|  |  |  |  |             var result = QueueConfiguration.Declare(ChannelAccessor.Channel); | 
			
		
	
		
			
				
					|  |  |  |  |             Logger.LogDebug($"RabbitMQ Queue '{QueueConfiguration.QueueName}' has {result.MessageCount} messages and {result.ConsumerCount} consumers."); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             if (BackgroundJobOptions.IsJobExecutionEnabled) | 
			
		
	
		
			
				
					|  |  |  |  |             if (AbpBackgroundJobOptions.IsJobExecutionEnabled) | 
			
		
	
		
			
				
					|  |  |  |  |             { | 
			
		
	
		
			
				
					|  |  |  |  |                 Consumer = new EventingBasicConsumer(ChannelAccessor.Channel); | 
			
		
	
		
			
				
					|  |  |  |  |                 Consumer.Received += MessageReceived; | 
			
		
	
	
		
			
				
					|  |  |  | 
 |