public void SetupApi()
        {
            query         = ConfigurationHelpers.RabbitMqQueryWithConfigSettings();
            channelAction = ConfigurationHelpers.ChannelWithAppConfigSettings();
            var shortTermConnection = ConfigurationHelpers.FreshConnectionFromAppConfig();

            router = new RabbitRouter(channelAction, shortTermConnection);
        }
        public void setup()
        {
            _config = new MessagingBaseConfiguration()
                      .WithDefaults()
                      //.UsesSecureConnections() // If you don't have HTTPS set up, comment out this line
                      .WithConnection(ConfigurationHelpers.RabbitMqConnectionWithConfigSettings());

            _messaging = _config.GetMessagingBase();

            _query = ConfigurationHelpers.RabbitMqQueryWithConfigSettings();
        }
Example #3
0
        public void setup()
        {
            _config = new MessagingBaseConfiguration()
                      .WithDefaults()
                      .UsesSecureConnections()
                      .WithConnection(ConfigurationHelpers.RabbitMqConnectionWithConfigSettings());

            _messaging = _config.GetMessagingBase();

            _query = ConfigurationHelpers.RabbitMqQueryWithConfigSettings();
        }
Example #4
0
 /// <summary>
 /// Use a specific rabbit management node.
 /// This is required to do a range of Virtual Host and User management.
 /// <para></para>
 /// If you only need to produce and consume messages, you don't need to configure this.
 /// </summary>
 /// <param name="host">Host DNS name or IP address</param>
 /// <param name="port">IP port the management API will be listening on</param>
 /// <param name="username">User name of an Administrator account</param>
 /// <param name="password">Password for the Administrator account</param>
 /// <param name="vhost">RabbitMQ virtual host this connection will be managing</param>
 /// <param name="credentialSecret">A private secret used to generate names and passwords of 'Limited' user accounts</param>
 [NotNull] public MessagingBaseConfiguration WithRabbitManagement(string host, int port, string username, string password, string vhost, string credentialSecret)
 {
     Set <IRabbitMqQuery>(() => {
         var scheme = _useSecure ? "https://" : "http://";
         var query  = new RabbitMqQuery(scheme + host + ":" + port, username, password, credentialSecret, vhost);
         if (_strictness == SslConnectionStrictness.Relaxed)
         {
             query.AcceptInvalidSsl = true;
         }
         return(query);
     }
                          );
     return(this);
 }