16 lines
698 B
C#
16 lines
698 B
C#
using Confluent.Kafka;
|
|
|
|
namespace JiShe.CollectBus.Kafka.Producer
|
|
{
|
|
public interface IProducerService
|
|
{
|
|
Task ProduceAsync<TKey, TValue>(string topic, TKey key, TValue value) where TKey : notnull where TValue : class;
|
|
|
|
Task ProduceAsync<TValue>(string topic, TValue value) where TValue : class;
|
|
|
|
Task ProduceAsync<TKey, TValue>(string topic, TKey key, TValue value, int? partition, Action<DeliveryReport<TKey, TValue>>? deliveryHandler = null) where TKey : notnull where TValue : class;
|
|
|
|
Task ProduceAsync<TValue>(string topic, TValue value, int? partition = null, Action<DeliveryReport<Null, TValue>>? deliveryHandler = null) where TValue : class;
|
|
}
|
|
}
|