Class MutableReactiveMessageReaderSpec

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void applySpec​(ReactiveMessageReaderSpec readerSpec)
      Updates this spec from the defined values of another spec.
      org.apache.pulsar.client.api.ConsumerCryptoFailureAction getCryptoFailureAction()
      Gets the action the reader will take in case of decryption failures.
      org.apache.pulsar.client.api.CryptoKeyReader getCryptoKeyReader()
      Gets the key reader to be used to decrypt the message payloads.
      java.lang.String getGeneratedSubscriptionNamePrefix()
      Gets the generated subscription name prefix.
      java.util.List<org.apache.pulsar.client.api.Range> getKeyHashRanges()
      Gets the key hash ranges of the reader.
      java.lang.Boolean getReadCompacted()
      Gets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.
      java.lang.String getReaderName()
      Gets the reader name.
      java.lang.Integer getReceiverQueueSize()
      Gets the size of the reader receive queue.
      java.lang.String getSubscriptionName()
      Gets the subscription name.
      java.util.List<java.lang.String> getTopicNames()
      Gets the topics to read from.
      void setCryptoFailureAction​(org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction)
      Sets the action the reader will take in case of decryption failures.
      void setCryptoKeyReader​(org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader)
      Sets the key reader to be used to decrypt the message payloads.
      void setGeneratedSubscriptionNamePrefix​(java.lang.String generatedSubscriptionNamePrefix)
      Sets the generated subscription name prefix.
      void setKeyHashRanges​(java.util.List<org.apache.pulsar.client.api.Range> keyHashRanges)
      Sets the key hash ranges of the reader.
      void setReadCompacted​(java.lang.Boolean readCompacted)
      Sets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.
      void setReaderName​(java.lang.String readerName)
      Sets the reader name.
      void setReceiverQueueSize​(java.lang.Integer receiverQueueSize)
      Sets the size of the reader receive queue.
      void setSubscriptionName​(java.lang.String subscriptionName)
      Sets the subscription name.
      void setTopicNames​(java.util.List<java.lang.String> topicNames)
      Sets the topics to read from.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MutableReactiveMessageReaderSpec

        public MutableReactiveMessageReaderSpec()
        Constructs a default MutableReactiveMessageReaderSpec.
      • MutableReactiveMessageReaderSpec

        public MutableReactiveMessageReaderSpec​(ReactiveMessageReaderSpec readerSpec)
        Constructs a MutableReactiveMessageReaderSpec from another ReactiveMessageReaderSpec.
        Parameters:
        readerSpec - the spec to construct from
    • Method Detail

      • setTopicNames

        public void setTopicNames​(java.util.List<java.lang.String> topicNames)
        Sets the topics to read from.
        Parameters:
        topicNames - the topic names
      • setReaderName

        public void setReaderName​(java.lang.String readerName)
        Sets the reader name.
        Parameters:
        readerName - the reader name
      • setSubscriptionName

        public void setSubscriptionName​(java.lang.String subscriptionName)
        Sets the subscription name.
        Parameters:
        subscriptionName - the name of the subscription
      • getGeneratedSubscriptionNamePrefix

        public java.lang.String getGeneratedSubscriptionNamePrefix()
        Description copied from interface: ReactiveMessageReaderSpec
        Gets the generated subscription name prefix. The default prefix is "reader".
        Specified by:
        getGeneratedSubscriptionNamePrefix in interface ReactiveMessageReaderSpec
        Returns:
        the generated subscription name prefix
        See Also:
        ReaderBuilder.subscriptionRolePrefix(String)
      • setGeneratedSubscriptionNamePrefix

        public void setGeneratedSubscriptionNamePrefix​(java.lang.String generatedSubscriptionNamePrefix)
        Sets the generated subscription name prefix.
        Parameters:
        generatedSubscriptionNamePrefix - the generated subscription name prefix
      • setReceiverQueueSize

        public void setReceiverQueueSize​(java.lang.Integer receiverQueueSize)
        Sets the size of the reader receive queue.
        Parameters:
        receiverQueueSize - the size of the reader receive queue
      • getReadCompacted

        public java.lang.Boolean getReadCompacted()
        Description copied from interface: ReactiveMessageReaderSpec
        Gets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.
        Specified by:
        getReadCompacted in interface ReactiveMessageReaderSpec
        Returns:
        true if messages are read from the compacted topic
        See Also:
        ReaderBuilder.readCompacted(boolean)
      • setReadCompacted

        public void setReadCompacted​(java.lang.Boolean readCompacted)
        Sets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.
        Parameters:
        readCompacted - true to read messages from the compacted topic
      • getKeyHashRanges

        public java.util.List<org.apache.pulsar.client.api.Range> getKeyHashRanges()
        Description copied from interface: ReactiveMessageReaderSpec
        Gets the key hash ranges of the reader.
        Specified by:
        getKeyHashRanges in interface ReactiveMessageReaderSpec
        Returns:
        the key hash ranges
        See Also:
        ReaderBuilder.keyHashRange(Range...)
      • setKeyHashRanges

        public void setKeyHashRanges​(java.util.List<org.apache.pulsar.client.api.Range> keyHashRanges)
        Sets the key hash ranges of the reader.
        Parameters:
        keyHashRanges - the key hash ranges
      • getCryptoKeyReader

        public org.apache.pulsar.client.api.CryptoKeyReader getCryptoKeyReader()
        Description copied from interface: ReactiveMessageReaderSpec
        Gets the key reader to be used to decrypt the message payloads.
        Specified by:
        getCryptoKeyReader in interface ReactiveMessageReaderSpec
        Returns:
        the key reader to be used to decrypt the message payloads
        See Also:
        ReaderBuilder.cryptoKeyReader(org.apache.pulsar.client.api.CryptoKeyReader)
      • setCryptoKeyReader

        public void setCryptoKeyReader​(org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader)
        Sets the key reader to be used to decrypt the message payloads.
        Parameters:
        cryptoKeyReader - the key reader to be used to decrypt the message payloads
      • getCryptoFailureAction

        public org.apache.pulsar.client.api.ConsumerCryptoFailureAction getCryptoFailureAction()
        Description copied from interface: ReactiveMessageReaderSpec
        Gets the action the reader will take in case of decryption failures.
        Specified by:
        getCryptoFailureAction in interface ReactiveMessageReaderSpec
        Returns:
        the action the reader will take in case of decryption failures
        See Also:
        ReaderBuilder.cryptoFailureAction(org.apache.pulsar.client.api.ConsumerCryptoFailureAction)
      • setCryptoFailureAction

        public void setCryptoFailureAction​(org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction)
        Sets the action the reader will take in case of decryption failures.
        Parameters:
        cryptoFailureAction - the action the reader will take in case of decryption failures
      • applySpec

        public void applySpec​(ReactiveMessageReaderSpec readerSpec)
        Updates this spec from the defined values of another spec.
        Parameters:
        readerSpec - the spec from which to update