Class ConversionException

All Implemented Interfaces:
Serializable

public class ConversionException extends KafkaException
Exception for conversions.
Author:
Gary Russell
See Also:
  • Constructor Details

    • ConversionException

      public ConversionException(String message, Throwable cause)
      Construct an instance with the provided properties.
      Parameters:
      message - A text message describing the reason.
      cause - the cause.
    • ConversionException

      public ConversionException(String message, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Throwable cause)
      Construct an instance with the provided properties.
      Parameters:
      message - A text message describing the reason.
      record - the consumer record.
      cause - the cause.
      Since:
      2.7.2
    • ConversionException

      public ConversionException(String message, List<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> records, Throwable cause)
      Construct an instance with the provided properties.
      Parameters:
      message - A text message describing the reason.
      records - the consumer records.
      cause - the cause.
      Since:
      2.7.2
    • ConversionException

      public ConversionException(String message, Message<?> msg, Throwable cause)
      Construct an instance with the provided properties.
      Parameters:
      message - A text message describing the reason.
      msg - a Message converted from a consumer record.
      cause - the cause.
      Since:
      2.7.2
  • Method Details

    • getRecord

      @Nullable public org.apache.kafka.clients.consumer.ConsumerRecord<?,?> getRecord()
      Return the consumer record, if available.
      Returns:
      the record.
      Since:
      2.7.2
    • getRecords

      public List<org.apache.kafka.clients.consumer.ConsumerRecord<?,?>> getRecords()
      Return the consumer record, if available.
      Returns:
      the record.
      Since:
      2.7.2
    • getMsg

      @Nullable public Message<?> getMsg()
      Return the Message, if available.
      Returns:
      the message.
      Since:
      2.7.2