[Obsolete("Use PublisherClientBuilder to customize client settings.")]
public sealed class SubscriberClient.ClientCreationSettings
Reference documentation and code samples for the Cloud Pub/Sub v1 API class SubscriberClient.ClientCreationSettings.
Settings for creating SubscriberServiceApiClients. This type is now obsolete; please use SubscriberClientBuilder which provides an API surface consistent with other clients (as well as additional Pub/Sub-specific properties such as ClientCount).
Namespace
Google.Cloud.PubSub.V1Assembly
Google.Cloud.PubSub.V1.dll
Constructors
ClientCreationSettings(int?, SubscriberServiceApiSettings, ChannelCredentials, string)
public ClientCreationSettings(int? clientCount = null, SubscriberServiceApiSettings subscriberServiceApiSettings = null, ChannelCredentials credentials = null, string serviceEndpoint = null)
Instantiate with the specified settings.
Parameters | |
---|---|
Name | Description |
clientCount | int Optional. The number of SubscriberServiceApiClients to create and use within a SubscriberClient instance. |
subscriberServiceApiSettings | SubscriberServiceApiSettings Optional. The settings to use when creating SubscriberServiceApiClient instances. |
credentials | ChannelCredentials Optional. Credentials to use when creating SubscriberServiceApiClient instances. |
serviceEndpoint | 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 | |
---|---|
Type | Description |
int |
Credentials
public ChannelCredentials Credentials { get; }
Credentials to use when creating SubscriberServiceApiClient instances.
If null
, defaults to using the default credentials.
Property Value | |
---|---|
Type | Description |
ChannelCredentials |
EmulatorDetection
public EmulatorDetection EmulatorDetection { get; }
Specifies how to respond to the presence of emulator environment variables.
Property Value | |
---|---|
Type | Description |
EmulatorDetection |
This property defaults to 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 | |
---|---|
Type | Description |
string |
SubscriberServiceApiSettings
public SubscriberServiceApiSettings SubscriberServiceApiSettings { get; }
The settings to use when creating SubscriberServiceApiClient instances.
If null
, defaults to GetDefault().
Property Value | |
---|---|
Type | Description |
SubscriberServiceApiSettings |
Methods
WithEmulatorDetection(EmulatorDetection)
public SubscriberClient.ClientCreationSettings WithEmulatorDetection(EmulatorDetection emulatorDetection)
Creates a new instance of this type with the specified emulator detection value.
Parameter | |
---|---|
Name | Description |
emulatorDetection | EmulatorDetection Determines how and whether to detect the emulator. |
Returns | |
---|---|
Type | Description |
SubscriberClientClientCreationSettings | The new instance |