You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
480 B

using Confluent.Kafka;
namespace Tiobon.Core.EventBus;
/// <summary>
/// Kafka连接池
/// </summary>
public interface IKafkaConnectionPool:IDisposable
{
/// <summary>
/// 取对象
/// </summary>
/// <returns></returns>
IProducer<string, byte[]> Producer();
/// <summary>
/// 将对象放入连接池
/// </summary>
/// <param name="producer"></param>
/// <returns></returns>
bool Return(IProducer<string, byte[]> producer);
}