/// <summary> /// Initializes a new instance of the <see cref="AdvancedRetriever{TMessage}" /> class. /// </summary> /// <param name="queue">name of the queue to retrieve from</param> /// <param name="channel">handle to the connection with retreival features</param> /// <param name="protocol">protocol to encode message with</param> /// <param name="logger">injected logger</param> public AdvancedRetriever(string queue, IAmqpRetriever channel, IAmqpMessageProtocol <TMessage> protocol, ILogger logger) : this(queue, false, channel, protocol, logger) { Arguments.NotNull(queue, nameof(queue)); Arguments.NotNull(channel, nameof(channel)); Arguments.NotNull(protocol, nameof(protocol)); Arguments.NotNull(logger, nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="AdvancedRetriever{TMessage}" /> class. /// </summary> /// <param name="queue">name of the queue to retrieve from</param> /// <param name="useNoAck"> flag to indicate whether or not 'NOACK' is enabled</param> /// <param name="channel">handle to the connection with retreival features</param> /// <param name="protocol">protocol to encode message with</param> /// <param name="logger">injected logger</param> public AdvancedRetriever(string queue, bool useNoAck, IAmqpRetriever channel, IAmqpMessageProtocol <TMessage> protocol, ILogger logger) : base(logger) { Arguments.NotNull(queue, nameof(queue)); Arguments.NotNull(channel, nameof(channel)); Arguments.NotNull(protocol, nameof(protocol)); Arguments.NotNull(logger, nameof(logger)); this.UseNoAck = useNoAck; this.Queue = queue; this.Channel = channel; this.protocol = protocol; }
/// <summary> /// Initializes a new instance of the <see cref="AdvancedPublisher{TMessage}" /> class. /// </summary> /// <param name="channel">rabbitmq connection channel</param> /// <param name="protocol">protocol to encode message with</param> /// <param name="logger">injected logger</param> public AdvancedPublisher(IAmqpPublisher channel, IAmqpMessageProtocol <TMessage> protocol, ILogger logger) : base(logger) { this.Channel = Arguments.EnsureNotNull(channel, nameof(channel)); this.protocol = Arguments.EnsureNotNull(protocol, nameof(protocol)); }