@Service public class KafkaProducerServiceImpl extends Object implements KafkaProducerService
构造器和说明 |
---|
KafkaProducerServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
org.springframework.util.concurrent.ListenableFuture<org.springframework.kafka.support.SendResult<String,byte[]>> |
sendAsync(String topic,
byte[] message,
InProducerTransactionJobHandler jobHandler)
执行异步发送消息
|
org.springframework.util.concurrent.ListenableFuture<org.springframework.kafka.support.SendResult<String,Object>> |
sendAsync(String topic,
Object message,
InProducerTransactionJobHandler jobHandler)
执行异步发送消息
|
void |
sendSync(String topic,
byte[] message,
InProducerTransactionJobHandler jobHandler)
执行同步发送消息
|
void |
sendSync(String topic,
Object message,
InProducerTransactionJobHandler jobHandler)
执行同步发送消息
|
public void sendSync(String topic, Object message, InProducerTransactionJobHandler jobHandler)
KafkaProducerService
sendSync
在接口中 KafkaProducerService
topic
- 主题message
- 消息jobHandler
- 后继处理任务,一般用于开启事务模式下,消息发送到broke后的后续任务处理public void sendSync(String topic, byte[] message, InProducerTransactionJobHandler jobHandler)
KafkaProducerService
sendSync
在接口中 KafkaProducerService
topic
- 主题message
- 消息jobHandler
- 后继处理任务,一般用于开启事务模式下,消息发送到broke后的后续任务处理public org.springframework.util.concurrent.ListenableFuture<org.springframework.kafka.support.SendResult<String,Object>> sendAsync(String topic, Object message, InProducerTransactionJobHandler jobHandler)
KafkaProducerService
sendAsync
在接口中 KafkaProducerService
topic
- 主题message
- 消息jobHandler
- 后继处理任务,一般用于开启事务模式下,消息发送到broke后的后续任务处理public org.springframework.util.concurrent.ListenableFuture<org.springframework.kafka.support.SendResult<String,byte[]>> sendAsync(String topic, byte[] message, InProducerTransactionJobHandler jobHandler)
KafkaProducerService
sendAsync
在接口中 KafkaProducerService
topic
- 主题message
- 消息jobHandler
- 后继处理任务,一般用于开启事务模式下,消息发送到broke后的后续任务处理