using Confluent.Kafka;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace JiaZhiQuan.Common.Messaging
{
    public interface IConsumer : IDisposable
    {
        event EventHandler<MessageReceivedEventArgs> Received;

        ConsumerConfig ClientConfig { get; set; }
        IEnumerable<string> TopicNames { get; set; }
        void Init();
        Task ConsumeAsync(CancellationTokenSource cts, string message);
    }
}
