21 lines
816 B
C#
21 lines
816 B
C#
using Confluent.Kafka;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
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<string, TValue>>? deliveryHandler = null) where TValue : class;
|
|
}
|
|
}
|