Here are the examples of the csharp api class System.Collections.Concurrent.BlockingCollection.Add(Spring.Messaging.Amqp.Rabbit.Listener.Delivery) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
Project: spring-net-amqp
Source File: BlockingQueueConsumer.cs
Source File: BlockingQueueConsumer.cs
public void HandleBasicDeliver(string consumerTag, BasicGetResult envelope, IBasicProperties properties, byte[] body) { if (this.outer.cancelled.Value) { if (this.outer.acknowledgeMode.TransactionAllowed()) { return; } } Logger.Debug(m => m("Storing delivery for {0}", this.outer.ToString())); try { // N.B. we can't use a bounded queue and offer() here with a timeout // in case the connection thread gets blocked this.outer.queue.Add(new Delivery(envelope, properties, body)); } catch (ThreadInterruptedException e) { Thread.CurrentThread.Interrupt(); } }