Send feedback
Class SubscriberSettings.Builder (1.4.12)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.4.12 keyboard_arrow_down
public abstract static class SubscriberSettings . Builder
Constructors
Builder()
Methods
build()
public abstract SubscriberSettings build ()
Returns
setAssignmentServiceClient(PartitionAssignmentServiceClient client)
public abstract SubscriberSettings . Builder setAssignmentServiceClient ( PartitionAssignmentServiceClient client )
A client to connect to the Pub/Sub lite assignment service. If present, ignores
CredentialsProvider.
Parameter
Returns
setCredentialsProvider(CredentialsProvider provider)
public abstract SubscriberSettings . Builder setCredentialsProvider ( CredentialsProvider provider )
A provider for credentials.
Parameter
Returns
setCursorServiceClient(CursorServiceClient client)
public abstract SubscriberSettings . Builder setCursorServiceClient ( CursorServiceClient client )
A CursorServiceClient to use, if present.
Parameter
Returns
setFramework(PubsubContext.Framework framework)
public abstract SubscriberSettings . Builder setFramework ( PubsubContext . Framework framework )
A Framework tag for internal metrics. Please set this if integrating with a public framework!
Parameter
Returns
setNackHandler(NackHandler nackHandler)
public abstract SubscriberSettings . Builder setNackHandler ( NackHandler nackHandler )
A handler for the action to take when com.google.cloud.pubsub.v1.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.
Parameter
Returns
setPartitions(List<Partition> partition)
public abstract SubscriberSettings . Builder setPartitions ( List<Partition> partition )
The partitions this subscriber should connect to to receive messages. If set, disables
auto-assignment.
Parameter
Returns
setPerPartitionFlowControlSettings(FlowControlSettings settings)
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.
Parameter
Returns
setReassignmentHandler(ReassignmentHandler reassignmentHandler)
public abstract SubscriberSettings . Builder setReassignmentHandler ( ReassignmentHandler reassignmentHandler )
A handler that will be notified when partition assignments change from the backend.
Parameter
Returns
setReceiver(MessageReceiver receiver)
public abstract SubscriberSettings . Builder setReceiver ( 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.
Parameter
Name Description receiver com.google.cloud.pubsub.v1.MessageReceiver
Returns
setSubscriberServiceClient(SubscriberServiceClient client)
public abstract SubscriberSettings . Builder setSubscriberServiceClient ( SubscriberServiceClient client )
A SubscriberServiceClient to use, if present.
Parameter
Returns
setSubscriptionPath(SubscriptionPath path)
public abstract SubscriberSettings . Builder setSubscriptionPath ( SubscriptionPath path )
The subscription to use to receive messages.
Parameter
Returns
public abstract SubscriberSettings . Builder setTransformer ( MessageTransformer<SequencedMessage , PubsubMessage > transformer )
The MessageTransformer to get PubsubMessages from Pub/Sub Lite wire messages. The messageId
field must not be set on the returned message.
Parameter
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[]]