Class PubSubPublisherOptions
- All Implemented Interfaces:
Serializable
Set via PubSubSinkBuilder.publisherOptions(PubSubPublisherOptions); optional — every
knob left unset keeps the SDK's (or the sink's) default behavior, so defaults() is
equivalent to not setting options at all.
In-flight publishes are bounded by the writer itself, along both dimensions that matter:
PubSubPublisherOptions.Builder.maxInFlightMessages(int) and PubSubPublisherOptions.Builder.maxInFlightBytes(long). Both yield
to the task mailbox rather than blocking the task thread, and both apply with message ordering
enabled. The SDK publisher's own flow controller is deliberately not exposed; the
connector documentation records why.
Instances are immutable and serializable.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationThe default time an unused publisher remains active before a checkpoint releases it.static final intThe default maximum number of publishers retained by one sink writer subtask.static final intThe defaultPubSubPublisherOptions.Builder.maxConsecutiveRejections(int): enough confirmed rejections in a row to say the stream's data is broken rather than anomalous, at an isolation cost of about a hundred solo publishes — onePublishround trip each — before the job fails.static final intPubSubPublisherOptions.Builder.maxConsecutiveRejections(int)value under which the bound never fires. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newPubSubPublisherOptions.Builder.static PubSubPublisherOptionsdefaults()Returns the default options: every knob left wherePubSubPublisherOptions.Builderinitialises it, which is the SDK's own default wherever the sink has no reason to pick one.booleanReturns the batch delay threshold, ornullfor the SDK default.Returns the batch element-count threshold, ornullfor the SDK default.Returns the batch request-byte threshold, ornullfor the SDK default.Returns how long an unused publisher remains active before a checkpoint releases it.intReturns the maximum number of publishers retained by one sink writer subtask.intReturns how many consecutive confirmed rejections fail the job, orUNBOUNDEDfor none.longReturns the writer's cap on the serialized bytes of unacknowledged publishes.intReturns the writer's cap on unacknowledged publishes.Returns how long the writer waits with no publish completing before it fails.Returns the first backoff of the topic auto-creation recovery.intReturns the maximum republish attempts of the topic auto-creation recovery.Returns the backoff cap of the topic auto-creation recovery.Returns the publish-retry delay multiplier, ornullfor the SDK default.Returns the initial publish-retry delay, ornullfor the SDK default.Returns the initial per-RPC timeout, ornullfor the SDK default.Returns the maximum publish attempts, ornullfor the SDK default (bounded only by the total timeout).Returns the maximum publish-retry delay, ornullfor the SDK default.Returns the maximum per-RPC timeout, ornullfor the SDK default.Returns the per-RPC timeout multiplier, ornullfor the SDK default.Returns the publish-retry total timeout, ornullfor the SDK default.Returns how long one publisher release waits for shutdown.booleanReturns whether any batching knob deviates from the SDK default.inthashCode()booleanReturns whether any publish-retry knob deviates from the SDK default.booleanReturns whether publishers honor message ordering keys.booleanReturns whether the writer registers per-topic send counters.Returns the topic auto-creation recovery schedule therecovery*knobs describe.toString()
-
Field Details
-
DEFAULT_MAX_CONSECUTIVE_REJECTIONS
public static final int DEFAULT_MAX_CONSECUTIVE_REJECTIONSThe defaultPubSubPublisherOptions.Builder.maxConsecutiveRejections(int): enough confirmed rejections in a row to say the stream's data is broken rather than anomalous, at an isolation cost of about a hundred solo publishes — onePublishround trip each — before the job fails.- See Also:
-
DEFAULT_MAX_ACTIVE_PUBLISHERS
public static final int DEFAULT_MAX_ACTIVE_PUBLISHERSThe default maximum number of publishers retained by one sink writer subtask.- See Also:
-
DEFAULT_DESTINATION_IDLE_TIMEOUT
The default time an unused publisher remains active before a checkpoint releases it. -
UNBOUNDED
public static final int UNBOUNDEDPubSubPublisherOptions.Builder.maxConsecutiveRejections(int)value under which the bound never fires.- See Also:
-
-
Method Details
-
builder
Creates a newPubSubPublisherOptions.Builder.- Returns:
- a new builder
-
defaults
Returns the default options: every knob left wherePubSubPublisherOptions.Builderinitialises it, which is the SDK's own default wherever the sink has no reason to pick one.The values themselves are on the
reference/pubsub.mdtable, one row per setter, rather than enumerated here.- Returns:
- the default options
-
getBatchElementCountThreshold
Returns the batch element-count threshold, ornullfor the SDK default. -
getBatchRequestByteThreshold
Returns the batch request-byte threshold, ornullfor the SDK default. -
getBatchDelayThreshold
Returns the batch delay threshold, ornullfor the SDK default. -
getRetryTotalTimeout
Returns the publish-retry total timeout, ornullfor the SDK default. -
getRetryInitialDelay
Returns the initial publish-retry delay, ornullfor the SDK default. -
getRetryDelayMultiplier
Returns the publish-retry delay multiplier, ornullfor the SDK default. -
getRetryMaxDelay
Returns the maximum publish-retry delay, ornullfor the SDK default. -
getRetryInitialRpcTimeout
Returns the initial per-RPC timeout, ornullfor the SDK default. -
getRetryRpcTimeoutMultiplier
Returns the per-RPC timeout multiplier, ornullfor the SDK default. -
getRetryMaxRpcTimeout
Returns the maximum per-RPC timeout, ornullfor the SDK default. -
getRetryMaxAttempts
Returns the maximum publish attempts, ornullfor the SDK default (bounded only by the total timeout). -
isEnableMessageOrdering
public boolean isEnableMessageOrdering()Returns whether publishers honor message ordering keys. -
getMaxInFlightMessages
public int getMaxInFlightMessages()Returns the writer's cap on unacknowledged publishes. -
getMaxInFlightBytes
public long getMaxInFlightBytes()Returns the writer's cap on the serialized bytes of unacknowledged publishes. -
getRecoveryInitialBackoff
Returns the first backoff of the topic auto-creation recovery. -
getRecoveryMaxBackoff
Returns the backoff cap of the topic auto-creation recovery. -
getRecoveryMaxAttempts
public int getRecoveryMaxAttempts()Returns the maximum republish attempts of the topic auto-creation recovery. -
getPublishProgressTimeout
Returns how long the writer waits with no publish completing before it fails. -
getShutdownTimeout
Returns how long one publisher release waits for shutdown. -
getMaxActivePublishers
public int getMaxActivePublishers()Returns the maximum number of publishers retained by one sink writer subtask. -
getDestinationIdleTimeout
Returns how long an unused publisher remains active before a checkpoint releases it. -
isPerDestinationMetrics
public boolean isPerDestinationMetrics()Returns whether the writer registers per-topic send counters. -
getMaxConsecutiveRejections
public int getMaxConsecutiveRejections()Returns how many consecutive confirmed rejections fail the job, orUNBOUNDEDfor none. -
toRecoverySchedule
Returns the topic auto-creation recovery schedule therecovery*knobs describe. Jittered: every subtask that parked publishes for the same missing topic resumes against the same freshly created topic, so unjittered they would republish in lockstep. -
hasBatchingOverrides
public boolean hasBatchingOverrides()Returns whether any batching knob deviates from the SDK default. -
hasRetryOverrides
public boolean hasRetryOverrides()Returns whether any publish-retry knob deviates from the SDK default. -
equals
-
hashCode
public int hashCode() -
toString
-