All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.shoothzj.kafka.producer.DemoProducerCallback Maven / Gradle / Ivy

package com.github.shoothzj.kafka.producer;

import org.apache.kafka.clients.producer.Callback;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DemoProducerCallback implements Callback {

    private static final Logger log = LoggerFactory.getLogger(DemoProducerCallback.class);

    @Override
    public void onCompletion(RecordMetadata metadata, Exception exception) {
        if (exception != null) {
            log.error("send message async exception ", exception);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy