Cloud Pub/Sub v1 API - Class PublisherClient.ClientCreationSettings (3.5.1)

[Obsolete("Use PublisherClientBuilder to customize client settings.")]
public sealed class PublisherClient.ClientCreationSettings

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

Settings for creating PublisherServiceApiClients. This type is now obsolete; please use PublisherClientBuilder which provides an API surface consistent with other clients (as well as additional Pub/Sub-specific properties such as ClientCount).

Inheritance

object > PublisherClient.ClientCreationSettings

Namespace

Google.Cloud.PubSub.V1

Assembly

Google.Cloud.PubSub.V1.dll

Constructors

ClientCreationSettings(int?, PublisherServiceApiSettings, ChannelCredentials, string)

public ClientCreationSettings(int? clientCount = null, PublisherServiceApiSettings publisherServiceApiSettings = null, ChannelCredentials credentials = null, string serviceEndpoint = null)

Instantiate with the specified settings.

Parameters
NameDescription
clientCountint

Optional. The number of PublisherServiceApiClients to create and use within a PublisherClient instance.

publisherServiceApiSettingsPublisherServiceApiSettings

Optional. The settings to use when creating PublisherServiceApiClient instances.

credentialsChannelCredentials

Optional. Credentials to use when creating PublisherServiceApiClient instances.

serviceEndpointstring

Optional. The endpoint to use when creating PublisherServiceApiClient instances.

Properties

ClientCount

public int? ClientCount { get; }

The number of PublisherServiceApiClients to create and use within a PublisherClient instance. If null, defaults to the CPU count on the machine this is being executed on.

Property Value
TypeDescription
int

Credentials

public ChannelCredentials Credentials { get; }

Credentials to use when creating PublisherServiceApiClient instances. If null, defaults to using the default credentials.

Property Value
TypeDescription
ChannelCredentials

EmulatorDetection

public EmulatorDetection EmulatorDetection { get; }

Specifies how to respond to the presence of emulator environment variables.

Property Value
TypeDescription
EmulatorDetection
Remarks

This property defaults to None, meaning that environment variables are ignored.

PublisherServiceApiSettings

public PublisherServiceApiSettings PublisherServiceApiSettings { get; }

The settings to use when creating PublisherServiceApiClient instances. If null, defaults to GetDefault().

Property Value
TypeDescription
PublisherServiceApiSettings

ServiceEndpoint

public string ServiceEndpoint { get; }

The endpoint to use when creating PublisherServiceApiClient instances. If null, defaults to DefaultEndpoint.

Property Value
TypeDescription
string

Methods

WithEmulatorDetection(EmulatorDetection)

public PublisherClient.ClientCreationSettings WithEmulatorDetection(EmulatorDetection emulatorDetection)

Creates a new instance of this type with the specified emulator detection value.

Parameter
NameDescription
emulatorDetectionEmulatorDetection

Determines how and whether to detect the emulator.

Returns
TypeDescription
PublisherClientClientCreationSettings

The new instance