Пример #1
0
        public SQLKafkaParentChildScenario(KafkaFixture kafkaFixture, Persistence.SQL.Tests.Fixtures.DbFixture dbFixture)
        {
            _kafkaFixture = kafkaFixture;
            _dbFixture    = dbFixture;
            _topicName    = $"SQLKafkaSimpleSagaScenario.{Guid.NewGuid()}";

            var(_, connStr) = _dbFixture.CreateDbContext();
            _sqlConfig      = new SqlConfiguration(connStr);
        }
Пример #2
0
        protected override void ConfigureTransportAndPersistence(IBusConfigurator cfg)
        {
            var(_, connStr) = _dbFixture.CreateDbContext();
            var sqlCfg = new SqlConfiguration(connStr);

            var kafkaConfig = _kafkaFixture.BuildKafkaConfiguration(_topicPrefix);

            cfg.UseKafkaTransport(kafkaConfig)
            .UseSqlPersistence(sqlCfg);
        }