Class ConsumerSettings.Builder (1.1.1)

public abstract static class ConsumerSettings.Builder

Inheritance

java.lang.Object > ConsumerSettings.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract ConsumerSettings build()
Returns
TypeDescription
ConsumerSettings

setAutocommit(boolean autocommit)

public abstract ConsumerSettings.Builder setAutocommit(boolean autocommit)

The autocommit mode.

Parameter
NameDescription
autocommitboolean
Returns
TypeDescription
ConsumerSettings.Builder

setPerPartitionFlowControlSettings(FlowControlSettings settings)

public abstract ConsumerSettings.Builder setPerPartitionFlowControlSettings(FlowControlSettings settings)

The per-partition flow control settings.

Parameter
NameDescription
settingscom.google.cloud.pubsublite.cloudpubsub.FlowControlSettings
Returns
TypeDescription
ConsumerSettings.Builder

setSubscriptionPath(SubscriptionPath path)

public abstract ConsumerSettings.Builder setSubscriptionPath(SubscriptionPath path)

The subscription path to use. Only the topic corresponding to this subscription can be subscribed to.

Parameter
NameDescription
pathcom.google.cloud.pubsublite.SubscriptionPath
Returns
TypeDescription
ConsumerSettings.Builder

setTopicPathOverride(TopicPath topicPath)

public abstract ConsumerSettings.Builder setTopicPathOverride(TopicPath topicPath)

An override for the TopicPath used by this consumer.

When this is set, the topic path of the subscription will not be fetched: instead, the topic used in methods will be compared with the provided TopicPath object.

This is useful if you do not have the pubsublite.subscriptions.get permission for the subscription.

Parameter
NameDescription
topicPathcom.google.cloud.pubsublite.TopicPath
Returns
TypeDescription
ConsumerSettings.Builder