Interface RawMessage

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    RawMessageImpl

    public interface RawMessage
    extends java.lang.AutoCloseable
    A representation of a message in a topic in its raw form (i.e. as it is stored in a managed ledger). RawMessages hold a refcount to the contains ByteBuf, so they must be closed for the ByteBuf to be freed.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()  
      io.netty.buffer.ByteBuf getHeadersAndPayload()
      Get a ByteBuf which contains the headers and payload of the message.
      org.apache.pulsar.client.api.MessageId getMessageId()
      Get the message ID of this message.
      org.apache.pulsar.common.api.proto.MessageIdData getMessageIdData()
      Get the protobuf representation of the message ID of this message.
      io.netty.buffer.ByteBuf serialize()
      Serialize a raw message to a ByteBuf.
    • Method Detail

      • getMessageId

        org.apache.pulsar.client.api.MessageId getMessageId()
        Get the message ID of this message.
      • getMessageIdData

        org.apache.pulsar.common.api.proto.MessageIdData getMessageIdData()
        Get the protobuf representation of the message ID of this message.
      • getHeadersAndPayload

        io.netty.buffer.ByteBuf getHeadersAndPayload()
        Get a ByteBuf which contains the headers and payload of the message. The payload may be compressed and encrypted, but whether this is the case can be verified by decoding the headers which are not.
      • serialize

        io.netty.buffer.ByteBuf serialize()
        Serialize a raw message to a ByteBuf. The caller is responsible for releasing the returned ByteBuf.
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable