Class KafkaProducerException

  • All Implemented Interfaces:
    java.io.Serializable

    public class KafkaProducerException
    extends KafkaException
    Exceptions when producing.
    Author:
    Gary Russell
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      KafkaProducerException​(org.apache.kafka.clients.producer.ProducerRecord<?,​?> failedProducerRecord, java.lang.String message, java.lang.Throwable cause)
      Construct an instance with the provided properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      <K,​V>
      org.apache.kafka.clients.producer.ProducerRecord<K,​V>
      getFailedProducerRecord()
      Return the failed producer record.
      org.apache.kafka.clients.producer.ProducerRecord<?,​?> getProducerRecord()
      Deprecated.
      • Methods inherited from class org.springframework.core.NestedRuntimeException

        contains, getMessage, getMostSpecificCause, getRootCause
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KafkaProducerException

        public KafkaProducerException​(org.apache.kafka.clients.producer.ProducerRecord<?,​?> failedProducerRecord,
                                      java.lang.String message,
                                      java.lang.Throwable cause)
        Construct an instance with the provided properties.
        Parameters:
        failedProducerRecord - the producer record.
        message - the message.
        cause - the cause.
    • Method Detail

      • getProducerRecord

        @Deprecated
        public org.apache.kafka.clients.producer.ProducerRecord<?,​?> getProducerRecord()
        Deprecated.
        Return the failed producer record.
        Returns:
        the record.
      • getFailedProducerRecord

        public <K,​V> org.apache.kafka.clients.producer.ProducerRecord<K,​V> getFailedProducerRecord()
        Return the failed producer record.
        Type Parameters:
        K - the key type.
        V - the value type.
        Returns:
        the record.
        Since:
        2.5