public bool AttemptReconnection(String host, int port, SslOptions sslConfig)
        {
            IBrokerInfo bd = new AmqBrokerInfo("amqp", host, port, sslConfig);

            _failoverPolicy.setBroker(bd);

            try
            {
                MakeBrokerConnection(bd);
                return(true);
            }
            catch (Exception e)
            {
                _log.Debug("Unable to connect to broker at " + bd, e);
                AttemptReconnection();
            }
            return(false);
        }
예제 #2
0
        public bool AttemptReconnection(String host, int port, SslOptions sslConfig)
        {
            IBrokerInfo bd = new AmqBrokerInfo("amqp", host, port, sslConfig);

            _failoverPolicy.setBroker(bd);

            try
            {
                MakeBrokerConnection(bd);
                return true;
            }
            catch (Exception e)
            {
                _log.Debug("Unable to connect to broker at " + bd, e);
                AttemptReconnection();
            }
            return false;
        }