Ana içeriğe geç
Bu sayfa henüz Türkçeye çevrilmedi; İngilizce sürümü gösteriliyor.
Versiyon: 1.6

Configuration Reference

This page documents all configuration options for Milvaion API and Workers.

Milvaion API Configuration​

appsettings.json Structure​

{
"ConnectionStrings": {
"DefaultConnectionString": "Host=your_host;Port=5432;Database=MilvaionDb;Username=your_username;Password=your_password;Pooling=true;Minimum Pool Size=20;Maximum Pool Size=100;Connection Lifetime=900;Connection Idle Lifetime=180;Command Timeout=30;Include Error Detail=true"
},
"MilvaionConfig": {
"Logging": {
"Seq": {
"Enabled": true,
"Uri": "http://seq:5341"
}
},
"OpenTelemetry": {
"Service": "milvaion-backend",
"Environment": "milvaion-test",
"Job": "app-metrics",
"Instance": "milvaion-test",
"CollectorUrl": "http://grafana-alloy:4317"
},
"Redis": {
"ConnectionString": "redis:6379",
"Password": "",
"Database": 0,
"ConnectTimeout": 5000,
"SyncTimeout": 5000,
"KeyPrefix": "Milvaion:JobScheduler:",
"DefaultLockTtlSeconds": 600
},
"RabbitMQ": {
"Host": "rabbitmq",
"Port": 5672,
"Username": "guest",
"Password": "guest",
"VirtualHost": "/",
"Durable": true,
"AutoDelete": false,
"ConnectionTimeout": 30,
"Heartbeat": 60,
"AutomaticRecoveryEnabled": true,
"NetworkRecoveryInterval": 10,
"QueueDepthWarningThreshold": 100,
"QueueDepthCriticalThreshold": 500,
"ManagementEnabled": false,
"ManagementPort": 15672
},
"JobDispatcher": {
"Enabled": true,
"PollingIntervalSeconds": 1,
"BatchSize": 100,
"LockTtlSeconds": 600,
"EnableStartupRecovery": true,
"ZombieThresholdMinutes": 2,
"MaxRetryAttempts": 3,
"RetryDelayMilliseconds": 1000
},
"WorkerHealthMonitor": {
"Enabled": true,
"CheckIntervalSeconds": 30,
"HeartbeatTimeoutSeconds": 120,
"JobHeartbeatTimeoutSeconds": 300
},
"WorkerAutoDiscovery": {
"Enabled": true
},
"ZombieOccurrenceDetector": {
"Enabled": true,
"CheckIntervalSeconds": 300,
"ZombieTimeoutMinutes": 10
},
"LogCollector": {
"Enabled": true,
"BatchSize": 100,
"BatchIntervalMs": 1000
},
"StatusTracker": {
"Enabled": true,
"BatchSize": 50,
"BatchIntervalMs": 100
},
"FailedOccurrenceHandler": {
"Enabled": true
},
"JobAutoDisable": {
"Enabled": true,
"ConsecutiveFailureThreshold": 5,
"FailureWindowMinutes": 60,
"AutoReEnableAfterCooldown": false,
"AutoReEnableCooldownMinutes": 30
}
}
}

Connection Strings​

SettingDescription
DefaultConnectionStringPostgreSQL connection string

OpenTelemetry​

Open telemetry configurations. Set null or empty via environment variables if you don't want export telemetry.

Redis Configuration​

SettingDefaultDescription
ConnectionStringlocalhost:6379Redis server address
Password""Redis password (if auth enabled)
Database0Redis database index (0-15)
ConnectTimeout5000Connection timeout in milliseconds
SyncTimeout5000Sync timeout for Redis operations in milliseconds.
KeyPrefixMilvaion:JobScheduler:Prefix applied to every key this application writes: the schedule, job cache, locks, the worker registry and its per-instance counters, and API key entries. Two deployments sharing one Redis instance must use different prefixes, or they will overwrite each other's state. Workers must be given the matching Worker:Redis:KeyPrefix.
DefaultLockTtlSeconds600Default lock TTL in seconds.

Why the key prefix matters​

Redis grants ACLs on key patterns, not on database numbers. Selecting a different Database therefore isolates nothing: a user allowed to read workers:* reads it in every database of the instance.

The prefix is what makes isolation expressible. Give each deployment its own, and an ACL rule scoped to that namespace is enough to keep it separate from every other one sharing the instance:

ACL SETUSER tenant-a on >secret ~Milvaion:TenantA:* +@all
ACL SETUSER tenant-b on >secret ~Milvaion:TenantB:* +@all

This only holds if no key escapes the prefix. Every key Milvaion writes is built from KeyPrefix — the schedule, the job cache, the locks, the worker registry with its per-instance counters, and the cached API keys — precisely so that a single pattern covers the whole footprint. A workload writing outside it would be reachable by every tenant, or by none.

Workers must be configured with the matching Worker:Redis:KeyPrefix: the cancellation channel is derived from it, so a worker on a different prefix subscribes to a channel the API never publishes to and silently stops honouring cancellations.

Message Transport​

SettingDefaultDescription
Transport:TypeRabbitMQMessage broker: RabbitMQ or Kafka. Every worker must use the same one (Worker:Transport:Type). With Kafka, the RabbitMQ settings below are ignored and the MilvaionConfig:Kafka section applies; see Using Kafka for its settings.

RabbitMQ Configuration​

SettingDefaultDescription
HostlocalhostRabbitMQ server hostname
Port5672AMQP port
UsernameguestRabbitMQ username
PasswordguestRabbitMQ password
VirtualHost/Virtual host name
Durable/Whether the queue should be durable (survives broker restart).
AutoDelete/Whether the queue should auto-delete when no consumers.
QueueTypeClassicRabbitMQ queue type used when declaring queues. Accepted values: Classic, Quorum. Must match the value used by any connected worker's Worker:RabbitMQ:QueueType setting for the same queues, otherwise RabbitMQ rejects the redeclare with a PRECONDITION_FAILED error. Changing this value for an already-existing queue requires deleting the queue in RabbitMQ first, since RabbitMQ does not support converting a queue's type in place.
PublisherConfirmstrueWhether publishing channels wait for the broker to acknowledge each message. With confirms on, a publish only completes once RabbitMQ has accepted the message and throws on nack or timeout; with them off it returns as soon as the bytes leave the socket, so a dropped message goes unreported. Turning it off saves one round trip per publish and is only reasonable where losing a message is acceptable. Consume-only channels never use confirms either way.
ConnectionTimeout/Connection timeout in seconds.
Heartbeat/Heartbeat interval in seconds (0 = disabled).
AutomaticRecoveryEnabled/Automatic connection recovery enabled.
NetworkRecoveryInterval/Network recovery interval in seconds.
QueueDepthWarningThreshold5000Message count that triggers a Warning health status.
QueueDepthCriticalThreshold10000Message count that triggers a Critical health status.
ManagementEnabledfalseEnable RabbitMQ Management HTTP API integration for richer queue stats and dynamic queue discovery.
ManagementPort15672RabbitMQ Management plugin HTTP port. Used when ManagementEnabled is true.

Job Dispatcher Configuration​

SettingDefaultDescription
EnabledtrueEnable/disable job dispatching
PollingIntervalSeconds1How often to check for due jobs
BatchSize100Max jobs to dispatch per poll
LockTtlSeconds600Distributed lock TTL (10 min)
EnableStartupRecoverytrueWhether to perform zombie job recovery on startup. Default: true.

Worker Health Monitor Configuration​

SettingDefaultDescription
EnabledtrueEnable/disable worker health monitoring
CheckIntervalSeconds30Interval between health checks in seconds
HeartbeatTimeoutSeconds120Worker heartbeat timeout in seconds. Workers that don't send heartbeat for this duration are marked as zombie. Default: 120 seconds (2 minutes)
JobHeartbeatTimeoutSeconds300Job heartbeat timeout in seconds. Running jobs that don't update heartbeat for this duration are marked as Unknown. Default: 300 seconds (5 minutes).

Worker Auto Discovery Configuration​

SettingDefaultDescription
EnabledtrueEnable worker auto discovery

Zombie Detector Configuration​

SettingDefaultDescription
EnabledtrueEnable zombie job detection
CheckIntervalSeconds300Interval (in seconds) between zombie detection checks. Default: 300 seconds (5 minutes).
ZombieTimeoutMinutes10Timeout (in minutes) before marking a Queued occurrence as zombie. Default: 10 minutes

Log Collector Configuration​

SettingDefaultDescription
EnabledtrueEnable log collection.
BatchSize100Batch size for processing log entries.
BatchIntervalMs1000Interval in milliseconds between processing batches.

Status Tracker Configuration​

SettingDefaultDescription
EnabledtrueEnable status tracking
BatchSize50Batch size for processing status updates.
BatchIntervalMs100Interval in milliseconds between processing batches.

Failed Occurrence Handler Configuration​

SettingDefaultDescription
EnabledtrueEnable failed occurrence handling

Job Auto Disable Configuration​

SettingDefaultDescription
EnabledtrueEnable auto-disable jobs on consecutive failures
ConsecutiveFailureThreshold5Number of consecutive failures before a job is automatically disabled. Individual jobs can override this with their own AutoDisableThreshold setting. Default: 5 consecutive failures
FailureWindowMinutes60Time window in minutes for counting consecutive failures. Failures older than this window don't count towards the threshold. This prevents jobs from being disabled due to old historical failures. Default: 60 minutes (1 hour)

Notifike Delivery Configuration​

Milvaion can hand its e-mail alerts and internal notifications to Notifike, the company's notification service, over Notifike's HTTP integration API. It sits under MilvaionConfig:Notifike, is off by default, and is read at startup. While it is off, or if the base URL or API key is missing or invalid, the local paths work as before.

{
"MilvaionConfig": {
"Notifike": {
"Enabled": false,
"SendOnlyInProduction": true,
"BaseUrl": "https://api.notifike.example.com",
"ApiKey": "YOUR_NOTIFIKE_API_KEY",
"UseForEmail": true,
"UseForInternalNotifications": true
}
}
}
SettingDefaultDescription
EnabledfalseTurns Notifike delivery on.
SendOnlyInProductiontrueUses Notifike only in the production environment; elsewhere the local paths apply.
BaseUrlemptyBase address of the Notifike API.
ApiKeyemptyKey of the Notifike application, sent in the X-Api-Key header. Keep it out of source control, for example with MilvaionConfig__Notifike__ApiKey. It is never logged or shown in the configuration screens.
UseForEmailtrueSends e-mail alerts through Notifike (POST /api/v1.0/notifications/send) instead of SMTP.
UseForInternalNotificationstrueAlso puts internal notifications in the recipients' Notifike in-app boxes (POST /api/v1.0/inApp/send), with the user name as UserKey.

What changes when it is on:

  • E-mail alerts go to the Alerting:Channels:Email:DefaultRecipients list without using the SMTP settings. The Email channel must still be enabled. A Notifike failure is reported as a failed channel; Milvaion does not fall back to SMTP.
  • Internal notifications are still stored locally, because Milvaion's own notification screens read those rows. The Notifike box receives a copy, and a Notifike failure does not affect the local notification.
  • The Email Worker is not affected. Its jobs choose an SMTP configuration and can set From, Cc, Bcc, Reply-To, custom headers, receipts and inline images, which Notifike has no equivalent for.

Crewhall Alert Channel Configuration​

Crewhall is an optional alert channel that posts alerts to a Crewhall chat through an incoming webhook. It sits under MilvaionConfig:Alerting:Channels:Crewhall, next to the other channels described in the Alerting guide, and is off by default. An enabled channel without a valid webhook URL for its default chat skips the alert.

{
"MilvaionConfig": {
"Alerting": {
"Channels": {
"Crewhall": {
"Enabled": false,
"SendOnlyInProduction": true,
"DefaultChat": "alerts",
"Chats": [
{
"Chat": "alerts",
"WebhookUrl": "https://crewhall.example.com/api/hooks/<id>?key=<key>"
}
]
}
}
}
}
}
SettingDefaultDescription
EnabledfalseEnables the channel.
SendOnlyInProductionglobal SendOnlyInProductionSends only in the production environment. When unset, the global alerting setting applies.
DefaultChatalertsName of the entry in Chats that receives alerts. Shown in the configuration screens.
Chats[].Chat-Name of the chat entry.
Chats[].WebhookUrl-Incoming webhook URL from the chat's webhook settings in Crewhall. The key is part of the URL, so treat it as a secret, for example with MilvaionConfig__Alerting__Channels__Crewhall__Chats__0__WebhookUrl. It is never logged or shown in the configuration screens.

Alerts are posted as cards. Crewhall accepts 60 requests a minute per webhook; requests over that limit are reported as a failed channel and are not retried. The "View Details" button needs an absolute link, so set Alerting:MilvaionAppUrl to get it.

Fresh installations route alerts to Crewhall from the Routes lists in appsettings. On an existing installation the routing already lives in the database, so select Crewhall per alert on the Settings screen.

BasePath Configuration​

Milvaion API supports hosting under a configurable sub-path (e.g. /milvaion) so that both the UI and the backend API can be scoped to a URL prefix. This is useful when deploying behind a reverse proxy alongside other services.

SettingDefaultDescription
BasePath""URL prefix this application receives requests on, applied as the ASP.NET path base. Leave empty to host at the root. Example: /milvaion
PublicBasePath""URL prefix the browser addresses the application on, when it differs from BasePath. Empty means "same as BasePath", which is correct unless a reverse proxy strips the prefix before forwarding.

When BasePath is set:

  • The REST API is available at {BasePath}/api/v1/... (e.g. /milvaion/api/v1/jobs)
  • The SignalR hub is available at {BasePath}/hubs/jobs
  • The Prometheus metrics endpoint is available at {BasePath}/metrics
  • The Scalar/OpenAPI documentation is available at {BasePath}/scalar/v1
  • The SPA (UI) is served at {BasePath} and all sub-routes fall back to the SPA index

When BasePath is empty or not set, the application is hosted at the root (/).

No rebuild required​

The base path is applied at startup, not when the frontend is built. The published image ships with a placeholder in place of the prefix, and the API substitutes the configured value into the SPA's assets — the URLs in index.html, the loader for lazily routed chunks, and the PWA manifest scope — as it boots.

One image therefore serves any prefix. Changing the base path means restarting the container, never rebuilding it.

VITE_BASE_PATH is not a runtime setting. It only affects a local npm run build, and the published image is built with the placeholder regardless. Setting it as a container environment variable has no effect; if its value disagrees with the configured base path, the API logs a warning at startup saying which value actually applies.

Behind a prefix-stripping reverse proxy​

Some proxies remove the prefix before forwarding, so the browser asks for /milvaion/jobs while the application receives /jobs. The two values then differ:

environment:
- MilvaionConfig__BasePath= # what this application receives: the root
- MilvaionConfig__PublicBasePath=/milvaion # what the browser uses

PublicBasePath drives everything the browser resolves — asset URLs, the router basename, and the base URL for API and SignalR calls — while BasePath stays the prefix the application is actually mounted on.

Keeping the prefix end to end is simpler: configure the proxy to pass it through, set only BasePath, and leave PublicBasePath empty.

Example Configuration​

{
"MilvaionConfig": {
"BasePath": "/milvaion"
}
}

Environment Variable Override​

MilvaionConfig__BasePath=/milvaion

Docker / docker-compose​

services:
milvaion-api:
image: milvasoft/milvaion-api:latest # pull from Docker Hub, no rebuild needed
environment:
- MilvaionConfig__BasePath=/milvaion

To revert to root hosting, remove the override or set it to empty:

environment:
- MilvaionConfig__BasePath=

Authentication Configuration (SSO)​

Milvaion can federate login to an external identity provider in addition to local username/password. Both providers live under MilvaionConfig:Authentication and are off by default; values are read at startup, so changing them requires a restart. See the Security guide for the full setup and the identity-ownership model.

{
"MilvaionConfig": {
"Authentication": {
"InactiveUserRetentionDays": 90,
"Oidc": {
"Enabled": false,
"Authority": "https://keycloak.example.com/realms/milvaion",
"ClientId": "milvaion-spa",
"RequireHttpsMetadata": true
},
"Ldap": {
"Enabled": false,
"Host": "ldap.example.com",
"Port": 636,
"UseSsl": true,
"BaseDn": "dc=corp,dc=example,dc=com"
}
}
}
}
SettingDefaultDescription
Authentication:Oidc:EnabledfalseEnables OpenID Connect (browser redirect SSO, e.g. Keycloak).
Authentication:Ldap:EnabledfalseEnables LDAP/Active Directory login via the normal username/password form.
Authentication:InactiveUserRetentionDays90Prunes external users who have not signed in for this many days. 0 disables pruning; local users are never touched.

Identity (name, email, group membership) is owned by the provider; the permission set of each mirrored role is assigned inside Milvaion. Full field reference for OIDC and LDAP is in the Security guide.

Projects Configuration (Preview)​

Projects let several teams share one installation, with each team's jobs, workflows, occurrences and api keys kept apart. The groundwork is in place, but projects cannot be created or managed from the dashboard yet, so leave this switched off. Until then every installation has a single project, Default, which holds all data.

{
"MilvaionConfig": {
"Projects": {
"Enabled": false,
"RequireExplicitProject": false,
"CacheSeconds": 30
}
}
}
SettingDefaultDescription
Projects:EnabledfalseWhen false, every request runs in the Default project and permissions work exactly as before. When true, the API reads the project of each request from the X-Milvaion-Project header (or the project of the api key) and applies permissions per project.
Projects:RequireExplicitProjectfalseWhen true and projects are enabled, users must name the project in every request. When false, a request without the header runs in the Default project.
Projects:CacheSeconds30How long project and membership lookups are cached in memory by each API instance.

Worker Configuration​

Worker appsettings.json Structure​

{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft": "Debug",
"System": "Debug"
}
},
"Worker": {
"WorkerId": "sample-worker-01",
"MaxParallelJobs": 128,
"ExecutionTimeoutSeconds": 300,
"RabbitMQ": {
"Host": "rabbitmq",
"Port": 5672,
"Username": "guest",
"Password": "guest",
"VirtualHost": "/"
},
"Redis": {
"ConnectionString": "redis:6379",
"Password": "",
"Database": 0,
"CancellationChannel": "Milvaion:JobScheduler:cancellation_channel"
},
"Heartbeat": {
"Enabled": true,
"IntervalSeconds": 5
},
"OfflineResilience": {
"Enabled": true,
"LocalStoragePath": "./worker_data",
"SyncIntervalSeconds": 30,
"MaxSyncRetries": 3,
"CleanupIntervalHours": 1,
"RecordRetentionDays": 1
}
},
"JobConsumers": {
"SimpleJob": {
"ConsumerId": "simple-consumer",
"MaxParallelJobs": 32,
"ExecutionTimeoutSeconds": 120,
"MaxRetries": 3,
"BaseRetryDelaySeconds": 5,
"LogUserFriendlyLogsViaLogger": true
},
"SendEmailJob": {
"ConsumerId": "email-consumer",
"MaxParallelJobs": 16,
"ExecutionTimeoutSeconds": 600,
"MaxRetries": 3,
"BaseRetryDelaySeconds": 5,
"LogUserFriendlyLogsViaLogger": true
}
}
}

Worker Core Settings​

SettingDefaultRequiredDescription
WorkerId-YesUnique identifier for this worker (app-level, user-defined). Example: "test-worker", "email-worker". Same across all replicas/instances.
MaxParallelJobs10NoMaximum parallel jobs this instance can run simultaneously. Default: ProcessorCount * 2 (e.g., 8 cores = 16 parallel jobs).
ExecutionTimeoutSeconds3600NoDefault maximum execution time allowed for jobs (in seconds). If a job exceeds this timeout, it will be cancelled and marked as TimedOut. Default: 3600 seconds (1 hour). Set to 0 or negative value for no timeout (not recommended). Can be overridden per job consumer in JobConsumerOptions.

Worker RabbitMQ Settings​

SettingDefaultDescription
HostlocalhostRabbitMQ server
Port5672AMQP port
UsernameguestUsername
PasswordguestPassword
VirtualHost/Virtual host
RoutingKeyPattern#Queue binding pattern. Don't recommended setting up routing patterns. The scheduler and worker will determine this automatically at runtime.
QueueTypeClassicRabbitMQ queue type used when declaring queues. Accepted values: Classic, Quorum. Must match the API's MilvaionConfig:RabbitMQ:QueueType setting for shared queues, otherwise RabbitMQ rejects the redeclare with a PRECONDITION_FAILED error.
PublisherConfirmstrueWhether the worker's publishing channels — status updates, logs, registration, heartbeat, retry and dead-letter republishes — wait for the broker's acknowledgement. Independent of the API's setting: unlike QueueType, this is a per-channel client concern and the two sides do not have to agree.

Worker Redis Settings​

SettingDefaultDescription
ConnectionStringlocalhost:6379Redis server
Password""Redis password
Database0Redis database index
KeyPrefixMilvaion:JobScheduler:Prefix used to build the cancellation pub/sub channel name ({KeyPrefix}cancellation_channel). Must match the API's MilvaionConfig:Redis:KeyPrefix setting so cancellation signals reach the worker.
CancellationChannel{KeyPrefix}cancellation_channelRedis pub/sub cancellation channel. Optional explicit override; if not set, it's derived from KeyPrefix. If you set this explicitly, you must set the matching value in the scheduler config too.

Heartbeat Settings​

SettingDefaultDescription
EnabledtrueSend heartbeats to Redis
IntervalSeconds10Heartbeat frequency

Offline Resilience Settings​

SettingDefaultDescription
EnabledtrueEnable local SQLite fallback
LocalStoragePath./worker_dataSQLite database location
SyncIntervalSeconds30Interval (in seconds) for syncing pending items to scheduler. Default: 30 seconds
MaxSyncRetries3Maximum number of retry attempts for failed sync operations. After max retries, items are marked as synced to prevent blocking. Default: 3
CleanupIntervalHours1Interval (in hours) for cleaning up old synced records. Default: 1 hours
RecordRetentionDays1Retention period (in days) for synced records before cleanup. Default: 1 days

Job Consumer Settings​

Each job type can have its own configuration:

{
"JobConsumers": {
"SendEmailJob": {
"MaxRetries": 5,
"BaseRetryDelaySeconds": 10,
"ExecutionTimeoutSeconds": 120
},
"GenerateReportJob": {
"MaxRetries": 2,
"BaseRetryDelaySeconds": 30,
"ExecutionTimeoutSeconds": 3600
}
}
}
SettingDefaultDescription
ConsumerIdnullConsumer identifier (user-defined, e.g., "test-consumer"). Used to identify this specific job consumer.
RoutingPatternnullRouting patterns this consumer handles. Don't recommended setting up routing patterns. The scheduler and worker will determine this automatically at runtime
MaxParallelJobs10Maximum parallel jobs this consumer can run simultaneously. RabbitMQ prefetch count.
ExecutionTimeoutSeconds3600Maximum execution time allowed for jobs in this consumer. If a job exceeds this timeout, it will be cancelled and marked as TimedOut. Default: 1 hour (3600 seconds). Set to 0 or negative value for no timeout (not recommended).
MaxRetries3Maximum number of retry attempts before moving to DLQ. Default: 3 retries. Set to 0 to disable retries (immediate DLQ on failure).
BaseRetryDelaySeconds5Base delay in seconds for exponential backoff retry strategy. Actual delay = BaseRetryDelaySeconds * (2 ^ retryAttempt). Example: BaseRetryDelaySeconds=5 → 5s, 10s, 20s, 40s... Default: 5 seconds.
LogUserFriendlyLogsViaLoggerfalseDetermine whether user-friendly logs should be logged via configured IMilvaLogger(ILogger).

Environment Variables​

Both API and Workers support environment variable overrides using double-underscore notation:

API Environment Variables​

# Connection string
ConnectionStrings__DefaultConnectionString=Host=db.prod.local;...

# Redis
MilvaionConfig__Redis__ConnectionString=redis.prod.local:6379
MilvaionConfig__Redis__Password=secretpassword

# RabbitMQ
MilvaionConfig__RabbitMQ__Host=rabbitmq.prod.local
MilvaionConfig__RabbitMQ__Username=milvaion
MilvaionConfig__RabbitMQ__Password=secretpassword

# Dispatcher
MilvaionConfig__JobDispatcher__PollingIntervalSeconds=2

Worker Environment Variables​

# Core
Worker__WorkerId=worker-prod-01
Worker__MaxParallelJobs=20

# RabbitMQ
Worker__RabbitMQ__Host=rabbitmq.prod.local
Worker__RabbitMQ__Username=worker
Worker__RabbitMQ__Password=secretpassword

# Redis
Worker__Redis__ConnectionString=redis.prod.local:6379

# Job-specific
JobConsumers__SendEmailJob__MaxRetries=5
JobConsumers__SendEmailJob__ExecutionTimeoutSeconds=120

Docker Compose Example​

services:
milvaion-api:
image: milvasoft/milvaion-api:latest
environment:
- ConnectionStrings__DefaultConnectionString=Host=postgres;...
- MilvaionConfig__Redis__ConnectionString=redis:6379
- MilvaionConfig__RabbitMQ__Host=rabbitmq

email-worker:
image: my-company/email-worker:latest
environment:
- Worker__WorkerId=email-worker-01
- Worker__RabbitMQ__Host=rabbitmq
- Worker__Redis__ConnectionString=redis:6379
- Worker__MaxParallelJobs=50

Kubernetes ConfigMap/Secret Example​

apiVersion: v1
kind: ConfigMap
metadata:
name: worker-config
data:
Worker__WorkerId: "email-worker"
Worker__MaxParallelJobs: "20"
Worker__RabbitMQ__Host: "rabbitmq.default.svc"

---
apiVersion: v1
kind: Secret
metadata:
name: worker-secrets
stringData:
Worker__RabbitMQ__Password: "secretpassword"
Worker__Redis__ConnectionString: "redis.default.svc:6379,password=secret"

Common Configuration Patterns​

High-Throughput Email Worker​

{
"Worker": {
"WorkerId": "email-worker",
"MaxParallelJobs": 100
},
"JobConsumers": {
"SendEmailJob": {
"ConsumerId": "email-consumer",
"MaxParallelJobs": 50,
"ExecutionTimeoutSeconds": 30,
"MaxRetries": 5,
"BaseRetryDelaySeconds": 10,
"LogUserFriendlyLogsViaLogger": true
}
}
}

CPU-Intensive Report Worker​

{
"Worker": {
"WorkerId": "report-worker",
"MaxParallelJobs": 4
},
"JobConsumers": {
"GenerateReportJob": {
"ConsumerId": "report-consumer",
"MaxParallelJobs": 2,
"ExecutionTimeoutSeconds": 7200,
"MaxRetries": 2,
"BaseRetryDelaySeconds": 60,
"LogUserFriendlyLogsViaLogger": true
}
}
}

Long-Running Data Migration Worker​

{
"Worker": {
"WorkerId": "migration-worker",
"MaxParallelJobs": 1,
"ExecutionTimeoutSeconds": 86400
},
"JobConsumers": {
"DataMigrationJob": {
"ConsumerId": "migration-consumer",
"MaxParallelJobs": 1,
"ExecutionTimeoutSeconds": 86400,
"MaxRetries": 1,
"BaseRetryDelaySeconds": 300,
"LogUserFriendlyLogsViaLogger": false
}
}
}

What's Next?​