Class MessageSendResult<T>

java.lang.Object
org.apache.pulsar.reactive.client.api.MessageSendResult<T>
Type Parameters:
T - the type of the message

public class MessageSendResult<T> extends Object
Result of a message sending. Holds the spec of the message sent and the assigned message ID.
  • 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 message
      messageSpec - the message spec that was sent
      exception - 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

      public MessageSpec<T> getMessageSpec()
      Gets the message spec that was sent.
      Returns:
      the message spec that was sent
    • getException

      public Throwable 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object