/// <summary>
        /// Gets the default configuration settings.
        /// </summary>
        /// <returns></returns>
        protected virtual IDictionary <string, string> GetDefaultConfigurationSettings()
        {
            return(new Dictionary <string, string>
            {
                { "listeners.tcp.default", "5672" },

                { "# logging to file and/or to an exchange", "" },
                { "# log.dir", RabbitMqConfigurationPathSanitizer.Sanitize(@"C:\temp") },
                { "log.file", "rabbit.log" },
                { "# log.file", "false" },
                { "log.file.level", "error" },

                { "# log.exchange", "true" },
                { "# log.exchange.level", "error" },
            });
        }
Beispiel #2
0
        /// <summary>
        /// Gets the default configuration settings.
        /// </summary>
        /// <returns></returns>
        protected override IDictionary <string, string> GetDefaultConfigurationSettings()
        {
            var defaultSettings = base.GetDefaultConfigurationSettings();

            var tlsSettings = new Dictionary <string, string>
            {
                { "listeners.ssl.default", "5671" },

                { "ssl_options.versions.1", "tlsv1.2" },
                { "ssl_options.versions.2", "tlsv1.1" },
                //{"ssl_options.versions.3", "tlsv1"},

                { "ssl_options.verify", "verify_peer" },
                { "ssl_options.fail_if_no_peer_cert", "false" },
                { "ssl_options.cacertfile", RabbitMqConfigurationPathSanitizer.Sanitize(ConvertCaCerToPemCommand.CertificatePath) },
                { "ssl_options.certfile", RabbitMqConfigurationPathSanitizer.Sanitize(ConvertPfxToPemCommand.CertificatePath) },
                { "ssl_options.keyfile", RabbitMqConfigurationPathSanitizer.Sanitize(ConvertPfxToPemCommand.KeyPath) }
            };

            return(new[] { defaultSettings, tlsSettings }.SelectMany(dict => dict)
                   .ToLookup(pair => pair.Key, pair => pair.Value)
                   .ToDictionary(group => group.Key, group => group.First()));
        }