2025-04-09 14:33:20 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace JiShe.CollectBus.Kafka.Consumer
|
|
|
|
|
|
{
|
2025-04-12 15:11:18 +08:00
|
|
|
|
public interface IConsumerService<TKey, TValue>
|
2025-04-09 14:33:20 +08:00
|
|
|
|
{
|
2025-04-12 15:11:18 +08:00
|
|
|
|
Task SubscribeAsync(string topic, Func<TKey, TValue, Task> messageHandler);
|
|
|
|
|
|
void Unsubscribe();
|
|
|
|
|
|
void Dispose();
|
2025-04-09 14:33:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|