public PersistentConnection(KafkaConnectionFactory connectionFactory, TimeSpan retryDelay,string purpose)
        {
            this.connectionFactory = connectionFactory;
            this.retryDelay = retryDelay;
            this.purpose = purpose;

            TryToConnect(null);
        }
 public KafkaConnectionManager(KafkaConnectionFactory connectionFactory, ConnectionConfiguration connectionConfiguration)
 {
     this.connectionFactory = connectionFactory;
     this.connectionConfiguration = connectionConfiguration;
 }