Class PulsarClientException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.pulsar.client.api.PulsarClientException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PulsarClientException.AlreadyClosedException, PulsarClientException.AuthenticationException, PulsarClientException.AuthorizationException, PulsarClientException.BrokerMetadataException, PulsarClientException.BrokerPersistenceException, PulsarClientException.ChecksumException, PulsarClientException.ConnectException, PulsarClientException.ConsumerAssignException, PulsarClientException.ConsumerBusyException, PulsarClientException.CryptoException, PulsarClientException.GettingAuthenticationDataException, PulsarClientException.IncompatibleSchemaException, PulsarClientException.InvalidConfigurationException, PulsarClientException.InvalidMessageException, PulsarClientException.InvalidServiceURL, PulsarClientException.InvalidTopicNameException, PulsarClientException.LookupException, PulsarClientException.MemoryBufferIsFullError, PulsarClientException.MessageAcknowledgeException, PulsarClientException.NotAllowedException, PulsarClientException.NotConnectedException, PulsarClientException.NotFoundException, PulsarClientException.NotSupportedException, PulsarClientException.ProducerBlockedQuotaExceededError, PulsarClientException.ProducerBlockedQuotaExceededException, PulsarClientException.ProducerBusyException, PulsarClientException.ProducerFencedException, PulsarClientException.ProducerQueueIsFullError, PulsarClientException.TimeoutException, PulsarClientException.TopicDoesNotExistException, PulsarClientException.TopicTerminatedException, PulsarClientException.TransactionConflictException, PulsarClientException.UnsupportedAuthenticationException

@Public @Stable public class PulsarClientException extends IOException
Base type of exception thrown by Pulsar client.
See Also:
  • Constructor Details

    • PulsarClientException

      public PulsarClientException(String msg)
      Constructs an PulsarClientException with the specified detail message.
      Parameters:
      msg - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
    • PulsarClientException

      public PulsarClientException(String msg, long sequenceId)
      Constructs an PulsarClientException with the specified detail message.
      Parameters:
      msg - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
      sequenceId - The sequenceId of the message
    • PulsarClientException

      public PulsarClientException(Throwable t)
      Constructs an PulsarClientException with the specified cause.
      Parameters:
      t - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • PulsarClientException

      public PulsarClientException(String msg, Throwable t)
      Constructs an PulsarClientException with the specified cause.
      Parameters:
      msg - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
      t - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • PulsarClientException

      public PulsarClientException(Throwable t, long sequenceId)
      Constructs an PulsarClientException with the specified cause.
      Parameters:
      t - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      sequenceId - The sequenceId of the message
  • Method Details

    • setPreviousExceptions

      public void setPreviousExceptions(Collection<Throwable> previous)
      Add a list of previous exception which occurred for the same operation and have been retried.
      Parameters:
      previous - A collection of throwables that triggered retries
    • getPreviousExceptions

      public Collection<Throwable> getPreviousExceptions()
      Get the collection of previous exceptions which have caused retries for this operation.
      Returns:
      a collection of exception, ordered as they occurred
    • toString

      public String toString()
      Overrides:
      toString in class Throwable
    • wrap

      public static Throwable wrap(Throwable t, String msg)
    • unwrap

      public static PulsarClientException unwrap(Throwable t)
    • getPreviousExceptions

      public static Collection<Throwable> getPreviousExceptions(Throwable t)
    • setPreviousExceptions

      public static void setPreviousExceptions(Throwable t, Collection<Throwable> previous)
    • getSequenceId

      public long getSequenceId()
    • setSequenceId

      public void setSequenceId(long sequenceId)
    • isRetriableError

      public static boolean isRetriableError(Throwable t)