For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.9

Configuration

Technical Preview

The C# SDK is a technical preview available from Camunda 8.9. It will become fully supported in Camunda 8.10. Its API surface may change in future releases without following semver.

Configuration and authentication types for the Camunda C# SDK.

CamundaOptions​

Options for constructing a . Mirrors the JS SDK's CamundaOptions with idiomatic C# conventions.

public sealed class CamundaOptions

Properties​

PropertyTypeDescription
ConfigDictionary<String>Strongly typed env-style overrides (CAMUNDA_* keys).
ConfigurationIConfigurationAn section (typically configuration.GetSection("Camunda")) to bind settings from appsettings.json or any other configuration provider. Keys use PascalCase property names (e.g. RestAddress, Auth:Strategy) and are mapped to the canonical CAMUNDA_* env-var names internally. Precedence (highest wins): > > environment variables > defaults.
HttpClientHttpClientCustom HttpClient factory. If not provided, a default HttpClient is created.
HttpMessageHandlerHttpMessageHandlerCustom HttpMessageHandler for the internal HttpClient (ignored if HttpClient is set). Useful for tests (e.g., MockHttpMessageHandler).
EnvDictionary<String>Provide a custom env map (mainly for tests). Defaults to Environment.GetEnvironmentVariable.
LoggerFactoryILoggerFactoryLogger factory for SDK logging.

CamundaConfig​

Hydrated Camunda configuration. Immutable after construction.

public sealed class CamundaConfig

Properties​

PropertyTypeDescription
RestAddressString
TokenAudienceString
DefaultTenantIdString
HttpRetryHttpRetryConfig
BackpressureBackpressureConfig
OAuthOAuthConfig
AuthAuthConfig
ValidationValidationConfig
LogLevelString
EventualEventualConfig
WorkerDefaultsWorkerDefaultsConfig
TlsTlsConfig

ConfigurationHydrator​

Hydrates a from environment variables and overrides. Mirrors the JS SDK's hydrateConfig function.

public static class ConfigurationHydrator

AuthConfig​

public sealed class AuthConfig

Properties​

PropertyTypeDescription
StrategyAuthStrategy
BasicBasicAuthConfig

AuthStrategy​

Supported authentication strategies.

public enum AuthStrategy
ValueDescription
None
OAuth
Basic

BasicAuthConfig​

public sealed class BasicAuthConfig

Properties​

PropertyTypeDescription
UsernameString
PasswordString

OAuthConfig​

public sealed class OAuthConfig

Properties​

PropertyTypeDescription
ClientIdString
ClientSecretString
OAuthUrlString
GrantTypeString
ScopeString
TimeoutMsInt32
RetryOAuthRetryConfig

OAuthRetryConfig​

public sealed class OAuthRetryConfig

Properties​

PropertyTypeDescription
MaxInt32
BaseDelayMsInt32

HttpRetryConfig​

public sealed class HttpRetryConfig

Properties​

PropertyTypeDescription
MaxAttemptsInt32
BaseDelayMsInt32
MaxDelayMsInt32

BackpressureConfig​

public sealed class BackpressureConfig

Properties​

PropertyTypeDescription
EnabledBoolean
ProfileString
ObserveOnlyBoolean
InitialMaxInt32
SoftFactorDouble
SevereFactorDouble
RecoveryIntervalMsInt32
RecoveryStepInt32
DecayQuietMsInt32
FloorInt32
SevereThresholdInt32

EventualConfig​

public sealed class EventualConfig

Properties​

PropertyTypeDescription
PollDefaultMsInt32

ValidationConfig​

public sealed class ValidationConfig

Properties​

PropertyTypeDescription
RequestValidationMode
ResponseValidationMode
RawString

ValidationMode​

Validation modes for request/response validation.

public enum ValidationMode
ValueDescription
None
Warn
Strict
Fanatical

JobWorkerConfig​

Configuration for a .

public sealed class JobWorkerConfig

Properties​

PropertyTypeDescription
JobTypeStringThe BPMN job type to subscribe to (e.g. "payment-service").
JobTimeoutMsNullable<Int64>How long (in ms) the job is reserved for this worker before the broker makes it available to other workers. Falls back to CAMUNDA_WORKER_TIMEOUT environment variable.
MaxConcurrentJobsNullable<Int32>Maximum number of jobs that may be in-flight (activated and being handled) concurrently by this worker. Controls how many jobs are requested per poll and how many handler tasks run in parallel. For I/O-bound handlers (HTTP calls, database queries), higher values (32–128) improve throughput because async handlers release threads during awaits. For CPU-bound handlers, set to or lower to avoid over-subscribing the thread pool. Set to 1 for sequential (single-job-at-a-time) processing. Falls back to CAMUNDA_WORKER_MAX_CONCURRENT_JOBS environment variable, then 10.
PollIntervalMsInt32Delay (in ms) between poll cycles when no jobs are available or when at capacity. Default: 500 ms.
PollTimeoutMsNullable<Int64>Long-poll timeout (in ms) sent to the broker. The broker holds the activation request open until jobs are available or this timeout elapses. null or 0 = broker default; negative = long polling disabled.
FetchVariablesList<String>Variable names to fetch from the process instance scope. null = fetch all.
WorkerNameStringWorker name sent to the broker for logging and diagnostics. Auto-generated if not set.
AutoStartBooleanWhether to start polling immediately on creation. Default: true.
StartupJitterMaxSecondsDoubleMaximum random delay (in seconds) before the worker starts polling. When multiple application instances restart simultaneously, this spreads out initial activation requests to avoid saturating the server. 0 (the default) means no delay.

ConfigErrorCode​

Configuration hydration errors.

public enum ConfigErrorCode
ValueDescription
MissingRequired
InvalidEnum
InvalidBoolean
InvalidInteger
InvalidValidationSyntax

ConfigErrorDetail​

public sealed class ConfigErrorDetail

Properties​

PropertyTypeDescription
KeyString
CodeConfigErrorCode
MessageString