internal AmqpModelContainer(IModel channel, ChannelFlags flags, AmqpChannelPooler source) { Channel = channel; Flags = flags; Source = source; Created = Environment.TickCount; }
internal RPCModelContainer(IModel channel, bool streamsPublisherConfirms, AmqpChannelPooler source) : base(channel, streamsPublisherConfirms ? ChannelFlags.RPCWithPublisherConfirms : ChannelFlags.RPC, source) { this._receivedResponse = new ManualResetEventSlim(); _consumer = new EventingBasicConsumer(channel); _consumer.ConsumerCancelled += (s, e) => SetModelToBeDiscarded(); _consumer.Received += ResponseReceived; //NOTE: Consumer is expecting just one response, so there is no need to call BasicQos here. //Start consuming channel.BasicConsume(RPCStrategyHelpers.DIRECT_REPLY_TO_QUEUENAME_ARG, true, _consumer); }