public void Load(IStartupSettings settings) { // http://www.rabbitmq.com/uri-spec.html // http://lostechies.com/derekgreer/2012/03/18/rabbitmq-for-windows-hello-world-review/ // amqp://guest:guest@localhost:5672/%2f var connectionUri = settings.GetValue <string>(UriStartupKey); _connectionFactory = new ConnectionFactory { Uri = connectionUri, Protocol = Protocols.DefaultProtocol }.ToOption(); }
public static QueueSettings Create(IStartupSettings settings) { try { return(new QueueSettings { RabbitAmqpUri = settings.GetValue <string>(RabbitMqAmqpUriKey) }); } catch (Exception e) { Logger.Error("Loading settings failed", e); throw new StartupConfigurationException(string.Format("Startup Settings corrupted: {0}", RabbitMqAmqpUriKey)); } }
public static HostSettings Create(IStartupSettings settings) { try { return(new HostSettings { ServiceHostUri = new Uri(settings.GetValue <string>(ServiceServiceHostUriKey)) }); } catch (Exception e) { Logger.Error("Loading settings failed", e); throw new StartupConfigurationException(string.Format("Startup Settings corrupted: {0}", ServiceServiceHostUriKey)); } }
public void Load(IStartupSettings settings) { var connectionUri = settings.GetValue <string>(UriStartupKey); _redis = ConnectionMultiplexer.Connect(connectionUri); }