Configuration
Overview
By default, Cronus and its sub-components have good default settings. However, not everything can be auto-configured, such as connection strings to databases or endpoints to various services.
Cronus
Name
Type
Required
Default Value
string
yes
string[]
yes
bool
no
true
bool
no
true
bool
no
true
bool
no
true
bool
no
true
Cronus:BoundedContext
Cronus uses this setting to personalize your application. This setting is used for naming the following components:
RabbiMQ exchange and queue names
Cassandra EventStore names
Cassandra Projection store names
Allowed Characters: Cronus:BoundedContext
must be an alphanumeric character or underscore only: ^\b([\w\d_]+$)
'
Cronus:Tenants
List of tenants allowed to use the system. Cronus is designed with multitenancy in mind from the beginning and requires at least one tenant to be configured in order to work properly. The multitenancy aspects are applied to many components and to give you a feel about this here is an incomplete list of different parts of the system using this setting:
Message - every message which is sent through Cronus is bound to a specific tenant
RabbitMQ exchanges and queues are tenant-aware
Event Store - every tenant has a separate storage
Projection Store - every tenant has a separate storage
Each value you provide in the array is converted and used further to lower.
Allowed Characters: Cronus:Tenants
must be an alphanumeric character or underscore only: ^\b([\w\d_]+$)
'
Example value: ["tenant1","tenant2","tenant3"]
Once set you could use TenantsOptions
object via Dependency Injection for other purposes.
Cronus:ApplicationServicesEnabled
Specifies whether to start a consumer for the Application Services
Cronus:ProjectionsEnabled
Specifies whether to start a consumer for the Projections
Cronus:PortsEnabled
Specifies whether to start a consumer for the Ports
Cronus:SagasEnabled
Specifies whether to start a consumer for the Sagas
Cronus:GatewaysEnabled
Specifies whether to start a consumer for the Gateways
Cronus.Api
Name
Type
Required
Default Value
configurationSection
no
configurationSection
no
Hosting
The API is hosted with Kestrel.
By default, the API is hosted on port 7477
.
A configuration could be provided by KestrelOptions. You can supply them directly in the DI or through a configuration file.
Cronus:Api:Kestrel
Authentication
The API could be protected using a JWT bearer authentication.
The configuration is provided by JwtBearerOptions. You can supply them directly in the DI or through a configuration file.
Cronus:Api:JwtAuthentication
Remarks: https://stackoverflow.com/a/58736850/224667
Cronus.Persistence.Cassandra
Name
Type
Required
Default Value
string
yes
string
no
simple
int
no
1
string[]
no
Cronus:Persistence:Cassandra:ConnectionString
The connection to the Cassandra database server
Cronus:Persistence:Cassandra:ReplicationStrategy
Configures Cassandra replication strategy. This setting has effect only in the first run when creating the database.
Valid values:
simple
network_topology - when using this setting you need to specify
Cronus:Persistence:Cassandra:ReplicationFactor
andCronus:Persistence:Cassandra:Datacenters
as well
Cronus.Projections.Cassandra
Name
Type
Required
Default Value
string
yes
string
no
simple
int
no
1
string[]
no
boolean
no
true
uint
no
2
Cronus:Projections:Cassandra:ConnectionString
Cronus:Projections:Cassandra:ConnectionString
The connection to the Cassandra database server
Cronus:Projections:Cassandra:ReplicationStrategy
Cronus:Projections:Cassandra:ReplicationStrategy
Configures Cassandra replication strategy. This setting has effect only in the first run when creating the database.
Valid values:
simple
network_topology - when using this setting you need to specify
Cronus:Projections:Cassandra:ReplicationFactor
andCronus:Projections:Cassandra:Datacenters
as well
Cronus:Projections:Cassandra:ReplicationFactor
Cronus:Projections:Cassandra:ReplicationFactor
Cronus:Projections:Cassandra:Datacenters
Cronus:Projections:Cassandra:Datacenters
Cronus:Projections:Cassandra:TableRetention:DeleteOldProjectionTables
Cronus:Projections:Cassandra:TableRetention:DeleteOldProjectionTables
Enables deletion of old projection tables
Cronus:Projections:Cassandra:TableRetention:NumberOfOldProjectionTablesToRetain
Cronus:Projections:Cassandra:TableRetention:NumberOfOldProjectionTablesToRetain
Configures Cassandra number of old projection tables -> default: live table and 2 old tables
Cronus.Transport.RabbitMq
Cronus:Transport:RabbiMQ:ConsumerWorkersCount
>> integer | Required: Yes | Default: 5
Cronus:Transport:RabbiMQ:ConsumerWorkersCount
>> integer | Required: Yes | Default: 5Configures the number of threads which will be dedicated to consuming messages from RabbitMQ for every consumer.
Cronus:Transport:RabbiMQ:Server
>> string | Required: Yes | Default: 127.0.0.1
Cronus:Transport:RabbiMQ:Server
>> string | Required: Yes | Default: 127.0.0.1DNS or IP to the RabbitMQ server
Cronus:Transport:RabbiMQ:Port
>> integer | Required: Yes | Default: 5672
Cronus:Transport:RabbiMQ:Port
>> integer | Required: Yes | Default: 5672The port number on which the RabbitMQ server is running
Cronus:Transport:RabbiMQ:VHost
>> string | Required: Yes | Default: /
Cronus:Transport:RabbiMQ:VHost
>> string | Required: Yes | Default: /The name of the virtual host. It is a good practice to not use the default /
vhost. For more details see the official docs. Cronus is not using this for managing multitenancy.
Cronus:Transport:RabbiMQ:Username
>> string | Required: Yes | Default: guest
Cronus:Transport:RabbiMQ:Username
>> string | Required: Yes | Default: guestThe RabbitMQ username
Cronus:Transport:RabbiMQ:Password
>> string | Required: Yes | Default: guest
Cronus:Transport:RabbiMQ:Password
>> string | Required: Yes | Default: guestThe RabbitMQ password
Cronus:Transport:RabbiMQ:AdminPort
>> integer | Required: Yes | Default: 5672
Cronus:Transport:RabbiMQ:AdminPort
>> integer | Required: Yes | Default: 5672RabbitMQ admin port used to create, delete rabbitmq resources
Cronus.AtomicAction.Redis
An implementation of Cronus.AtomicAction
using distributed locks with Redis
(Source: https://redis.io/topics/distlock)
Cronus:AtomicAction:Redis:ConnectionString
>> string | Required: Yes
Cronus:AtomicAction:Redis:ConnectionString
>> string | Required: YesConfigures the connection string where Redis is located
Cronus:AtomicAction:Redis:LockTtl
>> TimeSpan | Required: No | Default: 00:00:01.000
Cronus:AtomicAction:Redis:LockTtl
>> TimeSpan | Required: No | Default: 00:00:01.000Cronus:AtomicAction:Redis:ShorTtl
>> TimeSpan | Required: No | Default: 00:00:01.000
Cronus:AtomicAction:Redis:ShorTtl
>> TimeSpan | Required: No | Default: 00:00:01.000Cronus:AtomicAction:Redis:LongTtl
>> TimeSpan | Required: No | Default: 00:00:05.000
Cronus:AtomicAction:Redis:LongTtl
>> TimeSpan | Required: No | Default: 00:00:05.000Cronus:AtomicAction:Redis:LockRetryCount
>> int | Required: No | Default: 3
Cronus:AtomicAction:Redis:LockRetryCount
>> int | Required: No | Default: 3Cronus:AtomicAction:Redis:LockRetryDelay
>> TimeSpan | Required: No | Default: 00:00:00.100
Cronus:AtomicAction:Redis:LockRetryDelay
>> TimeSpan | Required: No | Default: 00:00:00.100Cronus:AtomicAction:Redis:ClockDriveFactor
>> double | Required: No | Default: 0.01
Cronus:AtomicAction:Redis:ClockDriveFactor
>> double | Required: No | Default: 0.01Last updated
Was this helpful?