Skip to main content
Version: 8.9 (unreleased)

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.
ThrowOnErrorBooleanIf true (default), non-2xx HTTP responses throw instead of returning an error object.

CamundaConfig

Hydrated Camunda configuration. Immutable after construction.

public sealed class CamundaConfig

Properties

PropertyTypeDescription
RestAddressString
TokenAudienceString
DefaultTenantIdString
HttpRetryHttpRetryConfig
BackpressureBackpressureConfig
OAuthOAuthConfig
AuthAuthConfig
ValidationValidationConfig
LogLevelString
EventualEventualConfig

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").
JobTimeoutMsInt64How long (in ms) the job is reserved for this worker before the broker makes it available to other workers.
MaxConcurrentJobsInt32Maximum 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.
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.

ConfigErrorCode

Configuration hydration errors.

public enum ConfigErrorCode
ValueDescription
MissingRequired
InvalidEnum
InvalidBoolean
InvalidInteger
InvalidValidationSyntax

ConfigErrorDetail

public sealed class ConfigErrorDetail

Properties

PropertyTypeDescription
KeyString
CodeConfigErrorCode
MessageString