Cloud Pub/Sub v1 API - Class PublisherClient.Settings (3.9.1)

public sealed class PublisherClient.Settings

Reference documentation and code samples for the Cloud Pub/Sub v1 API class PublisherClient.Settings.

Settings for the PublisherClient.

Inheritance

object > PublisherClient.Settings

Namespace

Google.Cloud.PubSub.V1

Assembly

Google.Cloud.PubSub.V1.dll

Constructors

Settings()

public Settings()

Create a new instance.

Properties

BatchingSettings

public BatchingSettings BatchingSettings { get; set; }

BatchingSettings that control how messages are batched when sending. If null, defaults to DefaultBatchingSettings.

Property Value
TypeDescription
BatchingSettings

CompressionBytesThreshold

public long? CompressionBytesThreshold { get; set; }

Specifies the threshold for the number of bytes in a message batch before compression is applied. This property comes into play only when EnableCompression is set to true. If the number of bytes in a batch is less than this value, compression will not be applied even if EnableCompression is true. If null, defaults to DefaultCompressionBytesThreshold.

Property Value
TypeDescription
long

DisposeTimeout

public TimeSpan? DisposeTimeout { get; set; }

Represents a time interval to wait for the PublisherClient to send any pending messages after the DisposeAsync() method has been called. If this time interval expires, the clean shutdown process will be aborted, and there may be locally queued messages that remain unsent. If null, defaults to DefaultDisposeTimeout.

Property Value
TypeDescription
TimeSpan

EnableCompression

public bool EnableCompression { get; set; }

Enables publish message compression. If set to true, messages will be compressed before being sent to the server by the PublisherClient.

Property Value
TypeDescription
bool

EnableMessageOrdering

public bool EnableMessageOrdering { get; set; }

Enable message ordering. It is invalid to set OrderingKey in a message if this has not been set to true.

Property Value
TypeDescription
bool

Scheduler

public IScheduler Scheduler { get; set; }

The IScheduler to use. If null, defaults to SystemScheduler. Usually only useful for testing.

Property Value
TypeDescription
IScheduler

Methods

Clone()

public PublisherClient.Settings Clone()

Create a clone of this object.

Returns
TypeDescription
PublisherClientSettings

A clone of this object.