Class SubscriberClient.ClientCreationSettings (2.3.0)

public sealed class ClientCreationSettings

Settings for creating SubscriberServiceApiClients.

Inheritance

System.Object > SubscriberClient.ClientCreationSettings

Namespace

Google.Cloud.PubSub.V1

Assembly

Google.Cloud.PubSub.V1.dll

Constructors

ClientCreationSettings(Nullable<Int32>, SubscriberServiceApiSettings, ChannelCredentials, String)

public ClientCreationSettings(int? clientCount = default(int? ), SubscriberServiceApiSettings subscriberServiceApiSettings = null, ChannelCredentials credentials = null, string serviceEndpoint = null)

Instantiate with the specified settings.

Parameters
NameDescription
clientCountSystem.Nullable<System.Int32>

Optional. The number of SubscriberServiceApiClients to create and use within a SubscriberClient instance.

subscriberServiceApiSettingsSubscriberServiceApiSettings

Optional. The settings to use when creating SubscriberServiceApiClient instances.

credentialsGrpc.Core.ChannelCredentials

Optional. Credentials to use when creating SubscriberServiceApiClient instances.

serviceEndpointSystem.String

Optional. The ServiceEndpoint to use when creating SubscriberServiceApiClient instances.

Properties

ClientCount

public int? ClientCount { get; }

The number of SubscriberServiceApiClients to create and use within a SubscriberClient instance. If set, must be in the range 1 to 256 (inclusive). If null, defaults to the CPU count on the machine this is being executed on.

Property Value
TypeDescription
System.Nullable<System.Int32>

Credentials

public ChannelCredentials Credentials { get; }

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

Property Value
TypeDescription
Grpc.Core.ChannelCredentials

EmulatorDetection

public EmulatorDetection EmulatorDetection { get; }

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

Property Value
TypeDescription
Google.Api.Gax.EmulatorDetection
Remarks

This property defaults to Google.Api.Gax.EmulatorDetection.None, meaning that environment variables are ignored.

ServiceEndpoint

public string ServiceEndpoint { get; }

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

Property Value
TypeDescription
System.String

SubscriberServiceApiSettings

public SubscriberServiceApiSettings SubscriberServiceApiSettings { get; }

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

Property Value
TypeDescription
SubscriberServiceApiSettings

Methods

WithEmulatorDetection(EmulatorDetection)

public SubscriberClient.ClientCreationSettings WithEmulatorDetection(EmulatorDetection emulatorDetection)

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

Parameter
NameDescription
emulatorDetectionGoogle.Api.Gax.EmulatorDetection

Determines how and whether to detect the emulator.

Returns
TypeDescription
SubscriberClient.ClientCreationSettings

The new instance