1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Registration/ControllerDynamicQueueRegistration.cs
2016-11-17 09:05:39 +01:00

32 lines
939 B
C#

using System;
using RabbitMQ.Client;
namespace Tapeti.Registration
{
public class ControllerDynamicQueueRegistration : AbstractControllerRegistration
{
private readonly IRoutingKeyStrategy routingKeyStrategy;
public ControllerDynamicQueueRegistration(IControllerFactory controllerFactory, IRoutingKeyStrategy routingKeyStrategy, Type controllerType)
: base(controllerFactory, controllerType)
{
this.routingKeyStrategy = routingKeyStrategy;
}
public override void ApplyTopology(IModel channel)
{
var queue = channel.QueueDeclare();
foreach (var messageType in GetMessageTypes())
{
//TODO use routing key attribute(s) for method or use strategy
//TODO use exchange attribute or default setting
//channel.QueueBind(queue.QueueName, );
}
}
}
}