public string BasicConsume(string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary filter, IBasicConsumer consumer) { ModelShutdown += new ModelShutdownEventHandler(consumer.HandleModelShutdown); BasicConsumerRpcContinuation k = new BasicConsumerRpcContinuation(); k.m_consumer = consumer; Enqueue(k); // Non-nowait. We have an unconventional means of getting // the RPC response, but a response is still expected. try { _Private_BasicConsume(queue, consumerTag, noLocal, noAck, exclusive, /*nowait:*/ false, filter); } catch (AlreadyClosedException) { // Ignored, since the continuation will be told about // the closure via an OperationInterruptedException because // of the shutdown event propagation. } k.GetReply(); string actualConsumerTag = k.m_consumerTag; return(actualConsumerTag); }
public void BasicCancel(string consumerTag) { BasicConsumerRpcContinuation k = new BasicConsumerRpcContinuation(); k.m_consumerTag = consumerTag; Enqueue(k); try { _Private_BasicCancel(consumerTag, false); } catch (AlreadyClosedException) { // Ignored, since the continuation will be told about // the closure via an OperationInterruptedException because // of the shutdown event propagation. } k.GetReply(); ModelShutdown -= new ModelShutdownEventHandler(k.m_consumer.HandleModelShutdown); }
public void BasicCancel(string consumerTag) { BasicConsumerRpcContinuation k = new BasicConsumerRpcContinuation(); k.m_consumerTag = consumerTag; Enqueue(k); _Private_BasicCancel(consumerTag, false); k.GetReply(); ModelShutdown -= new ModelShutdownEventHandler(k.m_consumer.HandleModelShutdown); }
public string BasicConsume(string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary<string, object> arguments, IBasicConsumer consumer) { ModelShutdown += new ModelShutdownEventHandler(consumer.HandleModelShutdown); BasicConsumerRpcContinuation k = new BasicConsumerRpcContinuation(); k.m_consumer = consumer; Enqueue(k); // Non-nowait. We have an unconventional means of getting // the RPC response, but a response is still expected. _Private_BasicConsume(queue, consumerTag, noLocal, noAck, exclusive, /*nowait:*/ false, arguments); k.GetReply(); string actualConsumerTag = k.m_consumerTag; return actualConsumerTag; }
public string BasicConsume(string queue, bool autoAck, string consumerTag, bool noLocal, bool exclusive, IDictionary<string, object> arguments, IBasicConsumer consumer) { var k = new BasicConsumerRpcContinuation { m_consumer = consumer }; Enqueue(k); // Non-nowait. We have an unconventional means of getting // the RPC response, but a response is still expected. _Private_BasicConsume(queue, consumerTag, noLocal, autoAck, exclusive, /*nowait:*/ false, arguments); k.GetReply(this.ContinuationTimeout); string actualConsumerTag = k.m_consumerTag; return actualConsumerTag; }
public void BasicCancel(string consumerTag) { var k = new BasicConsumerRpcContinuation { m_consumerTag = consumerTag }; Enqueue(k); _Private_BasicCancel(consumerTag, false); k.GetReply(this.ContinuationTimeout); lock (m_consumers) { m_consumers.Remove(consumerTag); } ModelShutdown -= k.m_consumer.HandleModelShutdown; }
public string BasicConsume(string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary<string, object> arguments, IBasicConsumer consumer) { ModelShutdown += new ModelShutdownEventHandler(consumer.HandleModelShutdown); BasicConsumerRpcContinuation k = new BasicConsumerRpcContinuation(); k.m_consumer = consumer; Enqueue(k); // Non-nowait. We have an unconventional means of getting // the RPC response, but a response is still expected. try { _Private_BasicConsume(queue, consumerTag, noLocal, noAck, exclusive, /*nowait:*/ false, arguments); } catch (AlreadyClosedException) { // Ignored, since the continuation will be told about // the closure via an OperationInterruptedException because // of the shutdown event propagation. } k.GetReply(); string actualConsumerTag = k.m_consumerTag; return actualConsumerTag; }