Optional: Configure Client settings
- Last UpdatedSep 30, 2024
- 3 minute read
The client settings configuration is automatically generated when you add a new data source. If you experience problems with timeouts or when adapter limits are exceeded in terms of browse or subscription operation, you can change the client settings configuration.
Configure client settings
Complete the following steps to configure adapter client settings. Use the PUT method in conjunction with the api/v1/configuration/<ComponentId>/ClientSettings REST endpoint to initialize the configuration.
-
Using a text editor, create an empty text file.
-
Copy and paste an example configuration for adapter client settings into the file.
For sample JSON, see the example section below.
-
Update the example JSON parameters for your environment.
For a table of all available parameters, see the client settings parameters below.
-
Save the file. For example, as ConfigureClientSettings.json.
-
Open a command line session. Change the directory to the location of ConfigureClientSettings.json.
-
Enter the following cURL command (which uses the PUT method) to initialize the client settings configuration.
curl -d "@ConfigureClientSettings.json" -H "Content-Type: application/json" -X PUT "http://localhost:5590/api/v1/configuration/AzureEventHubs1/ClientSettings"
Note: If you installed the adapter to listen on a non-default port, update 5590 to the port number you used.
If you use a component ID other than adapter1, update the endpoint with your chosen component ID.
For a list of other REST operations you can perform, like updating or deleting a client settings configuration, see the REST URLs below.
Client settings schema
The full schema definition for the adapter client settings configuration is in the EventHubs_ClientSettings_schema.json file located in one of the following folders:
-
Windows: %ProgramFiles%\osisoft\Adapters\EventHubs\Schemas
-
Linux: /opt/osisoft/Adapters/EventHubs/Schemas
Client settings parameters
The following parameters are available for configuring adapter client settings:
|
Parameter |
Required |
Type |
Description |
|---|---|---|---|
|
MaxInternalQueueSize |
Optional |
integer |
Specifies maximum number of value updates that can be held by the adapter in memory |
|
InternalQueuePollingIntervalInMs |
Optional |
string |
Specified interval at which data is removed from internal queue |
|
TrackLastEnqueuedEventProperties |
Optional |
boolean |
Indicates if the user should request information on the last enqueued event on the
partition associated with a given event and track that information as events are received
|
|
CacheEventCount |
Optional |
integer |
The maximum amount of events read from the Event Hubs service and held in a local
memory cache when reading is active and events are emitted to an enumerator for processing |
|
PrefetchCount |
Optional |
integer |
The number of events requested from the Event Hubs service and staged locally regardless
of whether a reader is active. PrefetchCount is intended to maximize throughput by buffering service operations. |
|
BatchSizeForCheckpoint |
Optional |
integer |
The number of events processed to trigger a checkpoint operation |
|
CheckpointingTimeoutSeconds |
Optional |
integer |
The timeout in seconds for the checkpoint operation |
|
DeviceIdSystemPropertyName |
Optional |
string |
The name of the system property for the device id. |
|
EventHubTransportType |
Optional |
enum |
Identifies the protocol used internally by the client. Although this setting defaults
to AmqpTcp, AmqpWebSockets may improve performance in some cases. |
|
EventHubLoadBalancingStrategy |
Optional |
enum |
The load balancing strategy used by the internal Event Hub client used by the adapter. For more information, see Microsoft's LoadBalancingStrategy Enum. Note: This setting is irrelevant when you use the recommended Event Hub configuration (single partition). Allowed values: Balanced or Greedy |
|
EventProcessorClientMaximumRetries |
Optional |
integer |
The maximum amount of retries that the EventProcessorClient makes in case of client
failures |
|
EventProcessorClientMaximumDelayInMin |
Optional |
integer |
The maximum delay for the timeout operation in minutes |
Client settings example
{
"MaxInternalQueueSize" : 500000,
"InternalQueuePollingIntervalInMs" : "0:00:00.05",
"TrackLastEnqueuedEventProperties" : false,
"CacheEventCount" : 100,
"PrefetchCount" : 300,
"BatchSizeForCheckpoint" : 500,
"CheckpointingTimeoutSeconds" : 60,
"DeviceIdSystemPropertyName" : "iothub-connection-device-id",
"EventHubTransportType" : "AmqpTcp",
"EventHubLoadBalancingStrategy": "Greedy",
"EventProcessorClientMaximumRetries" : 5,
"EventProcessorClientMaximumDelayInMin" : 5
}
REST URLs
|
Relative URL |
HTTP verb |
Action |
|---|---|---|
|
api/v1/configuration/ComponentId/ClientSettings |
GET |
Retrieves the adapter client settings configuration |
|
api/v1/configuration/ComponentId/ClientSettings |
PUT |
Configures or updates the adapter client settings configuration |
|
api/v1/configuration/ComponentId/ClientSettings |
DELETE |
Deletes the adapter client settings configuration |
|
api/v1/configuration/ComponentId/ClientSettings |
PATCH |
Allows partial updating of configured client settings fields |
Note: Replace ComponentId with the Id of your adapter component, for example adapter1.