A connection that attempts to reconnect if the inner connection is closed.
Inheritance: IPersistentConnection, IConnection
 public IConnection GetConsumeConnection()
 {
     //note: The purpose is there so that we/users can add more advanced connection managers in the future
     lock (connectionFactory)
     {
         return connectionConsume ?? (connectionConsume = new PersistentConnection(connectionFactory, connectionConfiguration.RetryDelay,"Consume"));
     }
 }
 public IConnection GetAdministrationConnection()
 {
     //note: The purpose is there so that we/users can add more advanced connection managers in the future
     lock (connectionFactory)
     {
         return(connectionAdministration ?? (connectionAdministration = new PersistentConnection(connectionFactory, connectionConfiguration.RetryDelay)));
     }
 }
示例#3
0
        public IConnection GetConnection(ConnectionPurpose purpose)
        {
            //note: The purpose is there so that we/users can add more advanced connection managers in the future

            lock (connectionFactory)
            {
                if (connectionFailed)
                {
                    throw connectionFailedReason;
                }

                return(connection ?? (connection = new PersistentConnection(connectionFactory, connectionConfiguration.RetryDelay)));
            }
        }