Class TimestampedException

All Implemented Interfaces:
Serializable

public class TimestampedException extends KafkaException
A KafkaException that records the timestamp of when it was thrown.
Since:
2.7
Author:
Tomaz Fernandes
See Also:
  • Constructor Details

    • TimestampedException

      public TimestampedException(Exception ex)
      Constructs an instance with the provided cause and the current time.
      Parameters:
      ex - the exception cause.
    • TimestampedException

      public TimestampedException(Exception ex, long timestamp)
      Creates an instance with the timestamp of when it was thrown and its cause.
      Parameters:
      ex - the exception cause.
      timestamp - the millis from epoch of when the exception was thrown.
      Since:
      2.7.13
    • TimestampedException

      public TimestampedException(Exception ex, Instant now)
      Creates an instance with the Instant of when it was thrown and its cause.
      Parameters:
      ex - the exception cause.
      now - the Instant of when the exception was thrown.
      Since:
      2.7.13
  • Method Details

    • getTimestamp

      public long getTimestamp()