public override TransportReceiveInfrastructure ConfigureReceiveInfrastructure() { return(new TransportReceiveInfrastructure( () => CreateMessagePump(), () => new QueueCreator(connectionFactory, routingTopology, settings.DurableMessagesEnabled()), () => Task.FromResult(ObsoleteAppSettings.Check()))); }
IRoutingTopology CreateRoutingTopology() { if (!settings.TryGet(out Func <bool, IRoutingTopology> topologyFactory)) { throw new InvalidOperationException("A routing topology must be configured with one of the 'EndpointConfiguration.UseTransport<RabbitMQTransport>().UseXXXXRoutingTopology()` methods."); } if (!settings.TryGet(SettingsKeys.UseDurableExchangesAndQueues, out bool useDurableExchangesAndQueues)) { if (!settings.DurableMessagesEnabled()) { throw new Exception("When durable messages are disabled, 'EndpointConfiguration.UseTransport<RabbitMQTransport>().UseDurableExchangesAndQueues()' must also be called to specify exchange and queue durability settings."); } useDurableExchangesAndQueues = true; } return(topologyFactory(useDurableExchangesAndQueues)); }