First steps
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) => {
services.AddOpenSleigh(cfg =>{ ... });
});Configure Transport and Persistence
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) => {
services.AddOpenSleigh(cfg =>{
var rabbitSection = hostContext.Configuration.GetSection("Rabbit");
var rabbitCfg = new RabbitConfiguration(rabbitSection["HostName"],
rabbitSection["UserName"],
rabbitSection["Password"]);
gfg.UseRabbitMQTransport(rabbitCfg);
var mongoSection = hostContext.Configuration.GetSection("Mongo");
var mongoCfg = new MongoConfiguration(mongoSection["ConnectionString"],
mongoSection["DbName"],
MongoSagaStateRepositoryOptions.Default);
cfg.UseMongoPersistence(mongoCfg);
});
});Adding a Saga
Last updated
Was this helpful?
