Class ReactiveMessageSendingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.pulsar.reactive.client.api.ReactiveMessageSendingException
All Implemented Interfaces:
Serializable

public class ReactiveMessageSendingException extends RuntimeException
A wrapper exception used by ReactiveMessageSender.sendMany(Publisher). The getMessageSpec() method will return the message that failed to be sent.
See Also:
  • Constructor Details

    • ReactiveMessageSendingException

      public ReactiveMessageSendingException(Throwable cause, MessageSpec<?> messageSpec)
      Creates a new instance.
      Parameters:
      cause - the cause of the failure
      messageSpec - the message that failed to be sent
  • Method Details

    • fillInStackTrace

      public Throwable fillInStackTrace()
      Overrides:
      fillInStackTrace in class Throwable
    • getMessageSpec

      public MessageSpec<?> getMessageSpec()
      Returns the message that failed to be sent.
      Returns:
      the message that failed to be sent.
    • getCorrelationMetadata

      public <C> C getCorrelationMetadata()
      Returns the correlation metadata of the message that failed to be sent.
      Type Parameters:
      C - the correlation metadata type
      Returns:
      the correlation metadata of the message that failed to be sent.
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable