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
A wrapper exception used by
ReactiveMessageSender.sendMany(Publisher)
. The
getMessageSpec()
method will return the message that failed to be sent.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveMessageSendingException
(Throwable cause, MessageSpec<?> messageSpec) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription<C> C
Returns the correlation metadata of the message that failed to be sent.MessageSpec<?>
Returns the message that failed to be sent.Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ReactiveMessageSendingException
Creates a new instance.- Parameters:
cause
- the cause of the failuremessageSpec
- the message that failed to be sent
-
-
Method Details
-
fillInStackTrace
- Overrides:
fillInStackTrace
in classThrowable
-
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
- Overrides:
getMessage
in classThrowable
-