/// <summary> /// Initializes a new instance of the <see cref="Consumer{M}"/> class. /// 消费者 最全构造 /// </summary> /// <param name="queue">queue</param> public Consumer(MQueue queue) { if (this.consumer == null) { this.consumer = new RabbitMQ.Consumer(queue); this.consumer.OnMessageReceive += Consumer_OnMessageReceive; } }
/// <summary> /// Initializes a new instance of the <see cref="Consumer{M}"/> class. /// 消费者 最全构造 /// </summary> /// <param name="queue">queue</param> /// <param name="_objCtx"></param> public Consumer(MQueue queue, object _objCtx = null) { if (this.consumer == null) { this.consumer = new RabbitMQ.Consumer(queue); this.consumer.OnMessageReceive += Consumer_OnMessageReceive; } this.objCtx = _objCtx; }