3131 *
3232 * @author Marius Bogoevici
3333 * @author Gary Russell
34- * @author Endika Guti?rrez
34+ * @author Endika Gutiérrez
3535 *
3636 * @see org.apache.kafka.clients.producer.Callback
3737 */
@@ -43,22 +43,6 @@ public interface ProducerListener<K, V> {
4343 * @param recordMetadata the result of the successful send operation
4444 */
4545 default void onSuccess (ProducerRecord <K , V > producerRecord , RecordMetadata recordMetadata ) {
46- onSuccess (producerRecord .topic (), producerRecord .partition (),
47- producerRecord .key (), producerRecord .value (), recordMetadata );
48- }
49-
50- /**
51- * Invoked after the successful send of a message (that is, after it has been acknowledged by the broker).
52- * If the method receiving the ProducerRecord is overridden, this method won't be called
53- * @param topic the destination topic
54- * @param partition the destination partition (could be null)
55- * @param key the key of the outbound message
56- * @param value the payload of the outbound message
57- * @param recordMetadata the result of the successful send operation
58- * @deprecated in favor of {@link #onSuccess(ProducerRecord, RecordMetadata)}.
59- */
60- @ Deprecated
61- default void onSuccess (String topic , Integer partition , K key , V value , RecordMetadata recordMetadata ) {
6246 }
6347
6448 /**
@@ -67,32 +51,6 @@ default void onSuccess(String topic, Integer partition, K key, V value, RecordMe
6751 * @param exception the exception thrown
6852 */
6953 default void onError (ProducerRecord <K , V > producerRecord , Exception exception ) {
70- onError (producerRecord .topic (), producerRecord .partition (),
71- producerRecord .key (), producerRecord .value (), exception );
72- }
73-
74- /**
75- * Invoked after an attempt to send a message has failed.
76- * If the method receiving the ProducerRecord is overridden, this method won't be called
77- * @param topic the destination topic
78- * @param partition the destination partition (could be null)
79- * @param key the key of the outbound message
80- * @param value the payload of the outbound message
81- * @param exception the exception thrown
82- * @deprecated in favor of {@link #onError(ProducerRecord, Exception)}.
83- */
84- @ Deprecated
85- default void onError (String topic , Integer partition , K key , V value , Exception exception ) {
86- }
87-
88- /**
89- * Return true if this listener is interested in success as well as failure.
90- * @deprecated the result of this method will be ignored.
91- * @return true to express interest in successful sends.
92- */
93- @ Deprecated
94- default boolean isInterestedInSuccess () {
95- return false ;
9654 }
9755
9856}
0 commit comments