-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Summary
Report: Kafka Topic Partition Configuration Not Working in DotNetCore.CAP.Kafka
Steps to Reproduce
Title: TopicOptions.NumPartitions Configuration Has No Effect on Kafka Topic Creation
Component: DotNetCore.CAP.Kafka
Version: 10.0.0
Environment:
.NET Version: 8.0
DotNetCore.CAP Version: [10.0.0]
DotNetCore.CAP.Kafka Version: [10.0.0]
Operating System: [Windows]
Issue Description:
When configuring Kafka topics through TopicOptions.NumPartitions and TopicOptions.ReplicationFactor, these settings are not being applied during topic creation. The Kafka topics are created with default partition counts (usually 1) instead of the specified values.
Steps to Reproduce:
Configure CAP with Kafka using the following code:
services.AddCap(options =>
{
options.UseKafka(kafkaOptions =>
{
kafkaOptions.Servers = "localhost:9092";
// These settings should create topics with 15 partitions and 2 replicas
kafkaOptions.TopicOptions.NumPartitions = 15;
kafkaOptions.TopicOptions.ReplicationFactor = 2;
kafkaOptions.MainConfig["group.id"] = "test.group";
});
options.UseSqlServer("connection_string");
options.DefaultGroupName = "test.group";
});
Expected Behavior
No response
Actual Behavior
No response
Log Output
CAP Configuration
Transport Used
None
Storage Provider
None
Environment
No response
Additional Context
No response