예제 #1
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));
        }
예제 #2
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);
        }
예제 #3
0
 public void BindTo(QueueInfo queueInfo, string routingKey)
 {
     bindings.Add(new BindingInfo(queueInfo, routingKey));
 }
예제 #4
0
 public BindingInfo(QueueInfo queue, string routingKey)
 {
     Queue      = queue;
     RoutingKey = routingKey;
 }
예제 #5
0
 public void BindTo(QueueInfo queueInfo, string routingKey)
 {
     bindings.Add(new BindingInfo(queueInfo, routingKey));
 }