2017-12-14 14 views

答えて

0

KafkaTemplateを参照してください:

/** 
* Set a {@link ProducerListener} which will be invoked when Kafka acknowledges 
* a send operation. By default a {@link LoggingProducerListener} is configured 
* which logs errors only. 
* @param producerListener the listener; may be {@code null}. 
*/ 
public void setProducerListener(ProducerListener<K, V> producerListener) { 
    this.producerListener = producerListener; 
} 

そして、その一つが、このあります答えを

/** 
* Invoked after an attempt to send a message has failed. 
* @param topic the destination topic 
* @param partition the destination partition (could be null) 
* @param key the key of the outbound message 
* @param value the payload of the outbound message 
* @param exception the exception thrown 
*/ 
void onError(String topic, Integer partition, K key, V value, Exception exception); 
+0

感謝を。私はそれを徹底的に調べます –

関連する問題