Class SubscriberSettings.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setReceiver

        public abstract SubscriberSettings.Builder setReceiver​(com.google.cloud.pubsub.v1.MessageReceiver receiver)
        The receiver which handles new messages sent by the Pub/Sub Lite system. Only one downcall from any connected partition will be outstanding at a time, and blocking in this receiver callback will block forward progress.
      • setPerPartitionFlowControlSettings

        public abstract SubscriberSettings.Builder setPerPartitionFlowControlSettings​(FlowControlSettings settings)
        The per-partition flow control settings. Because these apply per-partition, if you are using them to bound memory usage, keep in mind the number of partitions in the associated topic.
      • setPartitions

        public abstract SubscriberSettings.Builder setPartitions​(List<Partition> partition)
        The partitions this subscriber should connect to to receive messages. If set, disables auto-assignment.
      • setTransformer

        public abstract SubscriberSettings.Builder setTransformer​(MessageTransformer<SequencedMessage,​com.google.pubsub.v1.PubsubMessage> transformer)
        The MessageTransformer to get PubsubMessages from Pub/Sub Lite wire messages. The messageId field must not be set on the returned message.
      • setCredentialsProvider

        public abstract SubscriberSettings.Builder setCredentialsProvider​(com.google.api.gax.core.CredentialsProvider provider)
        A provider for credentials.
      • setNackHandler

        public abstract SubscriberSettings.Builder setNackHandler​(NackHandler nackHandler)
        A handler for the action to take when AckReplyConsumer.nack() is called. In Pub/Sub Lite, only a single subscriber for a given subscription is connected to any partition at a time, and there is no other client that may be able to handle messages.