Class MessageSendResult<T>
java.lang.Object
org.apache.pulsar.reactive.client.api.MessageSendResult<T>
- Type Parameters:
T
- the type of the message
Result of a message sending. Holds the spec of the message sent and the assigned
message ID.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageSendResult
(org.apache.pulsar.client.api.MessageId messageId, MessageSpec<T> messageSpec, Throwable exception) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
<C> C
Gets the correlation metadata of the message spec that was sent.Gets the exception if any.org.apache.pulsar.client.api.MessageId
Gets the ID assigned to the message.Gets the message spec that was sent.int
hashCode()
-
Constructor Details
-
MessageSendResult
public MessageSendResult(org.apache.pulsar.client.api.MessageId messageId, MessageSpec<T> messageSpec, Throwable exception) Creates a new instance.- Parameters:
messageId
- the ID assigned to the messagemessageSpec
- the message spec that was sentexception
- the exception if any
-
-
Method Details
-
getMessageId
public org.apache.pulsar.client.api.MessageId getMessageId()Gets the ID assigned to the message.- Returns:
- the ID assigned to the message.
-
getMessageSpec
Gets the message spec that was sent.- Returns:
- the message spec that was sent
-
getException
Gets the exception if any.- Returns:
- the exception if any
-
getCorrelationMetadata
public <C> C getCorrelationMetadata()Gets the correlation metadata of the message spec that was sent.- Type Parameters:
C
- the correlation metadata- Returns:
- the correlation metadata
-
equals
-
hashCode
public int hashCode()
-