/// <inheritdoc/>
        public int Flush(TimeSpan timeout)
        {
            var result = KafkaHandle.Flush(timeout.TotalMillisecondsAsInt());

            if (this.handlerException != null)
            {
                errorHandler?.Invoke(new Error(ErrorCode.Local_Application, handlerException.ToString()));
                var ex = this.handlerException;
                this.handlerException = null;
            }
            return(result);
        }
Esempio n. 2
0
 /// <summary>
 ///     Refer to <see cref="Confluent.Kafka.IProducer{TKey,TValue}.Flush(TimeSpan)" />
 /// </summary>
 public int Flush(TimeSpan timeout)
 => KafkaHandle.Flush(timeout.TotalMillisecondsAsInt());
Esempio n. 3
0
 /// <summary>
 ///     Wait until all outstanding produce requests, et.al, are completed. This should typically be done prior
 //      to destroying a producer instance to make sure all queued and in-flight produce requests are completed
 //      before terminating.
 /// </summary>
 public void Flush(TimeSpan timeout)
 => kafkaHandle.Flush(timeout.TotalMillisecondsAsInt());
Esempio n. 4
0
 /// <summary>
 ///     Wait until all outstanding produce requests, et.al, are completed. This should typically be done prior
 ///     to destroying a producer instance to make sure all queued and in-flight produce requests are completed
 ///     before terminating. The wait is limited by the optional millisecondsTimeout parameter.
 /// </summary>
 /// <returns>
 ///     Returns the number of remaining messages and requests in queue.
 /// </returns>
 public long Flush(int millisecondsTimeout)
 => kafkaHandle.Flush(millisecondsTimeout);