Skip to content

Commit

Permalink
KNetCompactedReplicator becomes the default engine (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
masesdevelopers authored Oct 14, 2023
1 parent f49540e commit a94c062
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/net/Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Owners>MASES s.r.l.</Owners>
<Authors>MASES s.r.l.</Authors>
<Company>MASES s.r.l.</Company>
<Version>0.9.1.0</Version>
<Version>0.9.2.0</Version>
<TargetFrameworks>net6.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class KafkaOptionsExtension : IDbContextOptionsExtension
private string? _applicationId;
private string? _bootstrapServers;
//private bool _producerByEntity = false;
private bool _useCompactedReplicator = false;
private bool _useCompactedReplicator = true;
private bool _usePersistentStorage = false;
private int _defaultNumPartitions = 1;
private int? _defaultConsumerInstances = null;
Expand Down Expand Up @@ -203,7 +203,7 @@ public virtual KafkaOptionsExtension WithBootstrapServers(string bootstrapServer
// return clone;
//}

public virtual KafkaOptionsExtension WithCompactedReplicator(bool useCompactedReplicator = false)
public virtual KafkaOptionsExtension WithCompactedReplicator(bool useCompactedReplicator = true)
{
var clone = Clone();

Expand Down
2 changes: 1 addition & 1 deletion src/net/KEFCore/Infrastructure/KafkaDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public KafkaDbContext(DbContextOptions options) : base(options)
/// <summary>
/// Use <see cref="MASES.KNet.Replicator.KNetCompactedReplicator{TKey, TValue}"/> instead of Apache Kafka Streams
/// </summary>
public virtual bool UseCompactedReplicator { get; set; } = false;
public virtual bool UseCompactedReplicator { get; set; } = true;
/// <summary>
/// The optional <see cref="ConsumerConfigBuilder"/> used when <see cref="UseCompactedReplicator"/> is <see langword="true"/>
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion test/Common/ProgramConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ProgramConfig
public bool EnableKEFCoreTracing { get; set; } = false;
public bool UseInMemoryProvider { get; set; } = false;
public bool UseModelBuilder { get; set; } = false;
public bool UseCompactedReplicator { get; set; } = false;
public bool UseCompactedReplicator { get; set; } = true;
public bool UsePersistentStorage { get; set; } = false;
public string DatabaseName { get; set; } = "TestDB";
public string DatabaseNameWithModel { get; set; } = "TestDBWithModel";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"DatabaseName": "TestDBBenchmarkAvro",
"UseInMemoryProvider": true,
"NumberOfExecutions": 10
"NumberOfExecutions": 10
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"UseCompactedReplicator": true,
"DatabaseName": "TestDBBenchmarkAvro",
"BootstrapServers": "192.168.1.103:9092",
"NumberOfExecutions": 10
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"DatabaseName": "TestDBBenchmarkAvro",
"UseCompactedReplicator": false,
"BootstrapServers": "192.168.1.103:9092",
"NumberOfExecutions": 10
}
3 changes: 2 additions & 1 deletion test/KEFCore.Benchmark.Test/BenchmarkTest.InMemory.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"DatabaseName": "TestDBBenchmark",
"UseInMemoryProvider": true,
"NumberOfExecutions": 10
"NumberOfExecutions": 10
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"UseCompactedReplicator": true,
"DatabaseName": "TestDBBenchmark",
"BootstrapServers": "192.168.1.103:9092",
"NumberOfExecutions": 10
}
2 changes: 2 additions & 0 deletions test/KEFCore.Benchmark.Test/BenchmarkTest.KafkaStreams.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"DatabaseName": "TestDBBenchmark",
"UseCompactedReplicator": false,
"BootstrapServers": "192.168.1.103:9092",
"NumberOfExecutions": 10
}
1 change: 0 additions & 1 deletion test/KEFCore.Complex.Test/ComplexTest.KNetReplicator.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"DatabaseName": "TestDBComplex",
"UseCompactedReplicator": true,
"BootstrapServers": "192.168.1.103:9092",
"NumberOfElements": 10,
"NumberOfExtraElements": 1
Expand Down
1 change: 0 additions & 1 deletion test/KEFCore.Test/Test.KNetReplicator.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"UseCompactedReplicator": true,
"BootstrapServers": "192.168.1.103:9092"
}
1 change: 0 additions & 1 deletion test/KEFCore.Test/Test.KNetReplicatorModelBuilder.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"UseCompactedReplicator": true,
"UseModelBuilder": true,
"BootstrapServers": "192.168.1.103:9092"
}
1 change: 0 additions & 1 deletion test/KEFCore.Test/Test.KNetReplicatorNoLoad.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"UseCompactedReplicator": true,
"DeleteApplicationData": false,
"LoadApplicationData": false,
"BootstrapServers": "192.168.1.103:9092"
Expand Down
1 change: 1 addition & 0 deletions test/KEFCore.Test/Test.KafkaStreams.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"UseCompactedReplicator": false,
"BootstrapServers": "192.168.1.103:9092"
}
1 change: 1 addition & 0 deletions test/KEFCore.Test/Test.KafkaStreamsModelBuilder.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"UseCompactedReplicator": false,
"UseModelBuilder": true,
"BootstrapServers": "192.168.1.103:9092"
}
1 change: 1 addition & 0 deletions test/KEFCore.Test/Test.KafkaStreamsNoLoad.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"DeleteApplicationData": false,
"LoadApplicationData": false,
"UseCompactedReplicator": false,
"BootstrapServers": "192.168.1.103:9092"
}
1 change: 1 addition & 0 deletions test/KEFCore.Test/Test.KafkaStreamsPersisted.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"UsePersistentStorage": true,
"DeleteApplicationData": false,
"LoadApplicationData": false,
"UseCompactedReplicator": false,
"BootstrapServers": "192.168.1.103:9092"
}

0 comments on commit a94c062

Please sign in to comment.