mirror of https://github.com/abpframework/abp.git
12 changed files with 129 additions and 58 deletions
@ -0,0 +1,29 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.RabbitMQ; |
||||
|
|
||||
|
namespace Volo.Abp.BackgroundJobs.RabbitMQ |
||||
|
{ |
||||
|
public class JobQueueConfiguration : QueueConfiguration |
||||
|
{ |
||||
|
public Type JobArgsType { get; } |
||||
|
|
||||
|
public string ConnectionName { get; set; } |
||||
|
|
||||
|
public JobQueueConfiguration( |
||||
|
Type jobArgsType, |
||||
|
string queueName, |
||||
|
string connectionName = null, |
||||
|
bool durable = true, |
||||
|
bool exclusive = false, |
||||
|
bool autoDelete = false) |
||||
|
: base( |
||||
|
queueName, |
||||
|
durable, |
||||
|
exclusive, |
||||
|
autoDelete) |
||||
|
{ |
||||
|
JobArgsType = jobArgsType; |
||||
|
ConnectionName = connectionName; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Volo.Abp.BackgroundJobs.RabbitMQ |
||||
|
{ |
||||
|
public class RabbitMqBackgroundJobOptions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Key: Job Args Type
|
||||
|
/// </summary>
|
||||
|
public Dictionary<Type, JobQueueConfiguration> JobQueues { get; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Default value: "AbpBackgroundJobs.".
|
||||
|
/// </summary>
|
||||
|
public string DefaultQueueNamePrefix { get; set; } |
||||
|
|
||||
|
public RabbitMqBackgroundJobOptions() |
||||
|
{ |
||||
|
JobQueues = new Dictionary<Type, JobQueueConfiguration>(); |
||||
|
DefaultQueueNamePrefix = "AbpBackgroundJobs."; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,9 +0,0 @@ |
|||||
using System.Collections.Generic; |
|
||||
|
|
||||
namespace Volo.Abp.RabbitMQ |
|
||||
{ |
|
||||
public class QueueOptionsDictionary : Dictionary<string, QueueOptions> |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue