1
0
mirror of synced 2024-11-05 11:09:17 +00:00
Tapeti/Registration/ControllerDynamicQueueRegistration.cs

32 lines
939 B
C#
Raw Normal View History

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, );
}
}
}
}