RabbitMqMessageQueue GetQueue(string queueName, bool removeExiting = false, bool oneExchangePerType = false, string inputExchange = null) { if (removeExiting) DeleteQueue(queueName); if (removeExiting && inputExchange != null) DeleteExchange(inputExchange); queuesToDelete.Add(queueName); var queue = new RabbitMqMessageQueue(ConnectionString, queueName); if (oneExchangePerType) queue.UseExchange(null); if (inputExchange != null) queue.UseExchangeAsInputAddress(inputExchange); DisposableTracker.TrackDisposable(queue); return queue.PurgeInputQueue(); }