protected override void Connect() { Connection = Helpers.MakeConnection(ConsumerInfo.Host); Model = Connection.CreateModel(); Helpers.DeclareQueue(Model, ConsumerInfo.QueueName, ConsumerInfo.IsPersistent); Model.BasicQos(0, ConsumerInfo.PrefetchCount, false); Consumer = new PostingConsumer(Model, Consume); Model.BasicConsume(ConsumerInfo.QueueName, !ConsumerInfo.RequireAck, Consumer); }
protected override void Cleanup() { Consumer = null; }