internal AtLeastOnceConsumingPromise(Queue queue, IConsumedMessageBuilder builder, ConsumingConfiguration configuration, Func<ILog> logBuilder) : base(queue, builder, configuration, logBuilder) { }
internal AtMostOnceConsumer(IInboundChannel inboundChannel, IOutboundChannel outboundChannel, Queue queue, IConsumedMessageBuilder builder, ConsumingConfiguration configuration) : base(inboundChannel, outboundChannel, queue, builder, configuration) { }
internal LoggedAtLeastOnceConsumer(IInboundChannel inboundChannel, IOutboundChannel outboundChannel, Queue queue, IConsumedMessageBuilder builder, ConsumingConfiguration configuration, ILog log) : base(inboundChannel, outboundChannel, queue, builder, configuration) { _log = log; }
protected internal ConsumingPromise(Queue queue, IConsumedMessageBuilder builder, ConsumingConfiguration configuration, Func<ILog> logBuilder) { Queue = queue; Builder = builder; Configuration = configuration; LogBuilder = logBuilder; }
protected internal ConsumerBase(IInboundChannel inboundChannel, IOutboundChannel outboundChannel, Queue queue, IConsumedMessageBuilder builder, ConsumingConfiguration configuration) { InboundChannel = inboundChannel; OutboundChannel = outboundChannel; _queue = queue; _builder = builder; Configuration = configuration; ConsumerCancelled += OnConsumerCancelled; }
public void DeclareExchangeBinding(Exchange exchange, Queue queue, String routingKey = "") { if (exchange == null) throw new ArgumentNullException(nameof(exchange)); if (queue == null) throw new ArgumentNullException(nameof(queue)); if (routingKey == null) throw new ArgumentNullException(nameof(routingKey)); if (!_bindings.Add(new ExchangeBinding(exchange, queue, routingKey))) throw new ArgumentException("dupicate binding detected"); }
private void Subscribe(Action<ConsumingConfiguration> configure, Func<IConsumedMessageBuilder, ConsumingConfiguration, ConsumingPromise> func, Queue queue) { var configuration = new ConsumingConfiguration(this, queue); configure(configuration); Func<IConsumedMessageBuilder, ConsumingPromise> f = _ => func(_, configuration); _promises.Add(f); }
private Queue DeclareQueue(String name, Boolean isDurable) { var queue = new Queue(name, isDurable); _queues.Add(queue); return queue; }
public Boolean TryDeclareExchangeBinding(Exchange exchange, Queue queue, String routingKey = "") { if (queue == null) throw new ArgumentNullException(nameof(queue)); if (routingKey == null) throw new ArgumentNullException(nameof(routingKey)); return _bindings.Add(new ExchangeBinding(exchange, queue, routingKey)); }
public void SubscribeByAtMostOnce(Queue queue, Action<ConsumingConfiguration> configure) { Subscribe(configure, (b, c) => new AtMostOnceConsumingPromise(queue, b, c, () => _configuration.Log), queue); }
public Boolean Equals(Queue other) { return String.Equals(Name, other.Name); }