/// <summary>
        ///     Processes the record.
        /// </summary>
        protected override void ProcessRecord()
        {
            Hostname = Hostname ?? DnsEx.GetDnsHostName();

            try
            {
                using (var connection = GetConnection(Hostname, Credential.UserName, Credential.GetNetworkCredential().Password, UseTls))
                {
                    using (var model = connection.CreateModel())
                    {
                        if (model.IsOpen)
                        {
                            WriteVerbose("Connection successful");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Connection failed. There might be an issue with the installation. Please check the RabbitMq log files:" + ex.Message, ex);
            }
        }