public QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary arguments) { if (!connection.Queues.ContainsKey(queue)) { var queueInfo = new QueueInfo(queue, durable, exclusive, autoDelete, arguments); connection.Queues.Add(queue, queueInfo); // do the default bind to the default exchange ... connection.Exchanges[""].BindTo(queueInfo, queue); } return(new QueueDeclareOk(queue, 0, 0)); }
public QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary arguments) { if (!connection.Queues.ContainsKey(queue)) { var queueInfo = new QueueInfo(queue, durable, exclusive, autoDelete, arguments); connection.Queues.Add(queue, queueInfo); // do the default bind to the default exchange ... connection.Exchanges[""].BindTo(queueInfo, queue); } return new QueueDeclareOk(queue, 0, 0); }
public void BindTo(QueueInfo queueInfo, string routingKey) { bindings.Add(new BindingInfo(queueInfo, routingKey)); }
public BindingInfo(QueueInfo queue, string routingKey) { Queue = queue; RoutingKey = routingKey; }