2016-11-16 22:11:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using RabbitMQ.Client;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Registration
|
|
|
|
|
{
|
|
|
|
|
public class ControllerQueueRegistration : AbstractControllerRegistration
|
|
|
|
|
{
|
|
|
|
|
private readonly string queueName;
|
|
|
|
|
|
2016-11-20 13:34:50 +00:00
|
|
|
|
public ControllerQueueRegistration(Func<IControllerFactory> controllerFactoryFactory, Type controllerType, string defaultExchange, string queueName) : base(controllerFactoryFactory, controllerType, defaultExchange)
|
2016-11-16 22:11:05 +00:00
|
|
|
|
{
|
|
|
|
|
this.queueName = queueName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-11-20 13:34:50 +00:00
|
|
|
|
public override string BindQueue(IModel channel)
|
2016-11-16 22:11:05 +00:00
|
|
|
|
{
|
2016-11-20 13:34:50 +00:00
|
|
|
|
return channel.QueueDeclarePassive(queueName).QueueName;
|
2016-11-16 22:11:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|