public sealed class SubscriberClient.Settings
Reference documentation and code samples for the Cloud Pub/Sub v1 API class SubscriberClient.Settings.
Settings for SubscriberClient.
Defaults will be used for null
properties.
Namespace
GoogleGoogle.CloudGoogle.Cloud.PubSubV1Assembly
Google.Cloud.PubSub.V1.dll
Constructors
Settings()
public Settings()
Create a new instance.
Properties
AckDeadline
public TimeSpan? AckDeadline { get; set; }
The lease time before which a message must either be ACKed
or have its lease extended. This is truncated to the nearest second.
If null
, uses the default of DefaultAckDeadline.
Property Value | |
---|---|
Type | Description |
TimeSpan |
AckExtensionWindow
public TimeSpan? AckExtensionWindow { get; set; }
Duration before AckDeadline at which the message ACK deadline
is automatically extended.
If null
, uses the default of DefaultAckExtensionWindow.
Property Value | |
---|---|
Type | Description |
TimeSpan |
Clock
public IClock Clock { get; set; }
The IClock used for timeouts and retries.
If null
, the default SystemClock is used.
This is usually only used for testing.
Property Value | |
---|---|
Type | Description |
IClock |
This is used only in exactly once delivery flow as we need to retry temporary failures.
DisposeTimeout
public TimeSpan? DisposeTimeout { get; set; }
Represents a time interval to wait for the SubscriberClient to acknowledge the handled messages
after the DisposeAsync() method has been called. If this time interval expires, the clean stop
process will be aborted, and some handled messages may remain un-acknowledged.
If null
, defaults to DefaultDisposeTimeout.
Property Value | |
---|---|
Type | Description |
TimeSpan |
FlowControlSettings
public FlowControlSettings FlowControlSettings { get; set; }
Flow control settings.
If null
, uses flow control settings from DefaultFlowControlSettings.
Property Value | |
---|---|
Type | Description |
FlowControlSettings |
MaxTotalAckExtension
public TimeSpan? MaxTotalAckExtension { get; set; }
Maximum duration for which a message ACK deadline will be extended.
If null
, uses the default of DefaultMaxTotalAckExtension.
Property Value | |
---|---|
Type | Description |
TimeSpan |
Scheduler
public IScheduler Scheduler { get; set; }
The IScheduler used to schedule delays.
If null
, the default SystemScheduler is used.
This is usually only used for testing.
Property Value | |
---|---|
Type | Description |
IScheduler |
UseLegacyFlowControl
public bool UseLegacyFlowControl { get; set; }
If set to true, disables enforcing flow control settings at the Cloud PubSub server and uses the less accurate method of only enforcing flow control at the client side.
Property Value | |
---|---|
Type | Description |
bool |
Methods
Clone()
public SubscriberClient.Settings Clone()
Create a clone of this object.
Returns | |
---|---|
Type | Description |
SubscriberClientSettings | A clone of this object. |