Class TopicMessageImpl<T>

  • All Implemented Interfaces:
    org.apache.pulsar.client.api.Message<T>

    public class TopicMessageImpl<T>
    extends java.lang.Object
    implements org.apache.pulsar.client.api.Message<T>
    • Method Detail

      • getTopicName

        public java.lang.String getTopicName()
        Get the topic name without partition part of this message.
        Specified by:
        getTopicName in interface org.apache.pulsar.client.api.Message<T>
        Returns:
        the name of the topic on which this message was published
      • getTopicPartitionName

        public java.lang.String getTopicPartitionName()
        Get the topic name which contains partition part for this message.
        Returns:
        the topic name which contains Partition part
      • getMessageId

        public org.apache.pulsar.client.api.MessageId getMessageId()
        Specified by:
        getMessageId in interface org.apache.pulsar.client.api.Message<T>
      • getInnerMessageId

        public org.apache.pulsar.client.api.MessageId getInnerMessageId()
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Specified by:
        getProperties in interface org.apache.pulsar.client.api.Message<T>
      • hasProperty

        public boolean hasProperty​(java.lang.String name)
        Specified by:
        hasProperty in interface org.apache.pulsar.client.api.Message<T>
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Specified by:
        getProperty in interface org.apache.pulsar.client.api.Message<T>
      • getData

        public byte[] getData()
        Specified by:
        getData in interface org.apache.pulsar.client.api.Message<T>
      • size

        public int size()
        Specified by:
        size in interface org.apache.pulsar.client.api.Message<T>
      • getPublishTime

        public long getPublishTime()
        Specified by:
        getPublishTime in interface org.apache.pulsar.client.api.Message<T>
      • getEventTime

        public long getEventTime()
        Specified by:
        getEventTime in interface org.apache.pulsar.client.api.Message<T>
      • getSequenceId

        public long getSequenceId()
        Specified by:
        getSequenceId in interface org.apache.pulsar.client.api.Message<T>
      • getProducerName

        public java.lang.String getProducerName()
        Specified by:
        getProducerName in interface org.apache.pulsar.client.api.Message<T>
      • hasKey

        public boolean hasKey()
        Specified by:
        hasKey in interface org.apache.pulsar.client.api.Message<T>
      • getKey

        public java.lang.String getKey()
        Specified by:
        getKey in interface org.apache.pulsar.client.api.Message<T>
      • hasBase64EncodedKey

        public boolean hasBase64EncodedKey()
        Specified by:
        hasBase64EncodedKey in interface org.apache.pulsar.client.api.Message<T>
      • getKeyBytes

        public byte[] getKeyBytes()
        Specified by:
        getKeyBytes in interface org.apache.pulsar.client.api.Message<T>
      • hasOrderingKey

        public boolean hasOrderingKey()
        Specified by:
        hasOrderingKey in interface org.apache.pulsar.client.api.Message<T>
      • getOrderingKey

        public byte[] getOrderingKey()
        Specified by:
        getOrderingKey in interface org.apache.pulsar.client.api.Message<T>
      • getValue

        public T getValue()
        Specified by:
        getValue in interface org.apache.pulsar.client.api.Message<T>
      • getEncryptionCtx

        public java.util.Optional<org.apache.pulsar.common.api.EncryptionContext> getEncryptionCtx()
        Specified by:
        getEncryptionCtx in interface org.apache.pulsar.client.api.Message<T>
      • getRedeliveryCount

        public int getRedeliveryCount()
        Specified by:
        getRedeliveryCount in interface org.apache.pulsar.client.api.Message<T>
      • getSchemaVersion

        public byte[] getSchemaVersion()
        Specified by:
        getSchemaVersion in interface org.apache.pulsar.client.api.Message<T>
      • isReplicated

        public boolean isReplicated()
        Specified by:
        isReplicated in interface org.apache.pulsar.client.api.Message<T>
      • getReplicatedFrom

        public java.lang.String getReplicatedFrom()
        Specified by:
        getReplicatedFrom in interface org.apache.pulsar.client.api.Message<T>
      • getMessage

        public org.apache.pulsar.client.api.Message<T> getMessage()
      • getSchemaInternal

        public org.apache.pulsar.client.api.Schema<T> getSchemaInternal()
      • getReaderSchema

        public java.util.Optional<org.apache.pulsar.client.api.Schema<?>> getReaderSchema()
        Specified by:
        getReaderSchema in interface org.apache.pulsar.client.api.Message<T>
      • release

        public void release()
        Specified by:
        release in interface org.apache.pulsar.client.api.Message<T>