Exemplo n.º 1
0
 /// <summary>
 /// Attempts to connect to data output stream.
 /// </summary>
 /// <remarks>
 /// Derived classes should attempt connection to data output stream here.  Any exceptions thrown
 /// by this implementation will result in restart of the connection cycle.
 /// </remarks>
 protected override void AttemptConnection()
 {
     m_router = new BrokerRouter(new KafkaOptions(m_servers)
     {
         Log = new TimeSeriesLogger(OnStatusMessage, OnProcessException)
     });
     m_producer = new Producer(m_router);
     MetadataRefreshOperation.RunOnceAsync();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Attempts to connect to data output stream.
 /// </summary>
 /// <remarks>
 /// Derived classes should attempt connection to data output stream here.  Any exceptions thrown
 /// by this implementation will result in restart of the connection cycle.
 /// </remarks>
 protected override void AttemptConnection()
 {
     m_router = new BrokerRouter(new KafkaOptions(m_servers)
     {
         Log = new TimeSeriesLogger
               (
             (status, args) => OnStatusMessage(MessageLevel.Info, string.Format(status, args)),
             ex => OnProcessException(MessageLevel.Warning, ex)
               )
     });
     m_producer = new Producer(m_router);
     MetadataRefreshOperation.RunOnceAsync();
 }