public RabbitMQReader(RabbitMQReaderSetup setup, bool cloneSetup) { MethodInvocationTrace.Write(); _setup = cloneSetup ? setup.Clone() : setup; _invocationTracker = new ConcurrentOperationManager(GetType().FullName); _conn = RabbitMQReaderConnection.Create(_setup, false); _deleteQueue = !_setup.IsDurable; _throttler = (_setup.Options == null) ? NoOpDequeueThrottler.Instance : _setup.Options.DequeueThrottlerFactory.Create(_setup.Exchange, _setup.QueueName); }
public IRabbitMQReader CreateReader(RabbitMQReaderSetup setup) { setup = setup.Clone(); RabbitMQReader reader = null; try { reader = new RabbitMQReader(setup, false); reader.EnsureOpen(setup.Timeout, setup.CancelToken); return reader; } catch { DisposeHelper.DisposeIfNotNull(reader); throw; } }
public static RabbitMQReaderConnection Create(RabbitMQReaderSetup setup, bool cloneSetup) { return new RabbitMQReaderConnection(cloneSetup ? setup.Clone() : setup); }