public async Task CanUseAlternateCustomExchangeName() { const string connectionString = RabbitMqTransportFactory.ConnectionString; var rabbitMqTransport = new RabbitMqTransport(connectionString, "inputQueue", new ConsoleLoggerFactory(false)); var defaultTopicExchange = "defaultTopicExchange"; rabbitMqTransport.SetTopicExchangeName(defaultTopicExchange); var topic = "myTopic"; var alternateExchange = "alternateExchange"; var topicWithAlternateExchange = $"{topic}@{alternateExchange}"; var subscriberAddresses = await rabbitMqTransport.GetSubscriberAddresses(topicWithAlternateExchange); Assert.That(subscriberAddresses[0], Is.EqualTo(topicWithAlternateExchange)); subscriberAddresses = await rabbitMqTransport.GetSubscriberAddresses(topic); Assert.That(subscriberAddresses[0], Is.EqualTo($"{topic}@{defaultTopicExchange}")); subscriberAddresses = await rabbitMqTransport.GetSubscriberAddresses(topic + '@'); Assert.That(subscriberAddresses[0], Is.EqualTo($"{topic}@")); }
public Task <string[]> GetSubscriberAddresses(string topic) { return(transport.GetSubscriberAddresses(topic)); }