SQL Server
SQL Server supports both the Master database and Agent transport layers.
Install
dotnet add package JobMaster.SqlServer
Configuration
builder.Services.AddJobMasterCluster(config =>
{
config.ClusterId("My-Cluster")
.UseSqlServerForMaster("Server=...;Database=...;User Id=...;Password=...;TrustServerCertificate=True;");
config.AddAgentConnectionConfig("SqlServer-1")
.UseSqlServerForAgent("Server=...;Database=...;User Id=...;Password=...;TrustServerCertificate=True;");
});
Options
Table prefix
By default, JobMaster creates tables with the jm_ prefix. Override it per layer:
config.UseSqlTablePrefixForMaster("myapp_jm_");
config.AddAgentConnectionConfig("SqlServer-1")
.UseSqlTablePrefixForAgent("myapp_agent_");
Disable auto schema provisioning
By default, JobMaster creates and migrates its tables on startup. Disable this if you manage schema migrations yourself:
config.UseSqlServerForMaster("...")
.DisableAutoProvisionSqlSchema();