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.
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 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_]+$)
'
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.
Specifies whether to start a consumer for the Application Services
Specifies whether to start a consumer for the Projections
Specifies whether to start a consumer for the Ports
Specifies whether to start a consumer for the Sagas
Specifies whether to start a consumer for the Gateways
Name
Type
Required
Default Value
configurationSection
no
configurationSection
no
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.
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.
Remarks: https://stackoverflow.com/a/58736850/224667
Name
Type
Required
Default Value
string
yes
string
no
simple
int
no
1
string[]
no
The connection to the Cassandra database server
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
and Cronus:Persistence:Cassandra:Datacenters
as well
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
The connection to the Cassandra database server
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
and Cronus:Projections:Cassandra:Datacenters
as well
Cronus:Projections:Cassandra:ReplicationFactor
Cronus:Projections:Cassandra:Datacenters
Cronus:Projections:Cassandra:TableRetention:DeleteOldProjectionTables
Enables deletion of old projection tables
Cronus:Projections:Cassandra:TableRetention:NumberOfOldProjectionTablesToRetain
Configures Cassandra number of old projection tables -> default: live table and 2 old tables
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.1DNS or IP to the RabbitMQ server
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: /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: guestThe RabbitMQ username
Cronus:Transport:RabbiMQ:Password
>> string | Required: Yes | Default: guestThe RabbitMQ password
Cronus:Transport:RabbiMQ:AdminPort
>> integer | Required: Yes | Default: 5672RabbitMQ admin port used to create, delete rabbitmq resources
An implementation of Cronus.AtomicAction
using distributed locks with Redis
(Source: https://redis.io/topics/distlock)
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.000Cronus:AtomicAction:Redis:ShorTtl
>> TimeSpan | Required: No | Default: 00:00:01.000Cronus:AtomicAction:Redis:LongTtl
>> TimeSpan | Required: No | Default: 00:00:05.000Cronus:AtomicAction:Redis:LockRetryCount
>> int | Required: No | Default: 3Cronus:AtomicAction:Redis:LockRetryDelay
>> TimeSpan | Required: No | Default: 00:00:00.100Cronus:AtomicAction:Redis:ClockDriveFactor
>> double | Required: No | Default: 0.01