diff --git a/pkg/kafka/config_helper.go b/pkg/kafka/config_helper.go index 2ffe796..ace8c5f 100644 --- a/pkg/kafka/config_helper.go +++ b/pkg/kafka/config_helper.go @@ -27,6 +27,7 @@ func NewKgoConfig(cfg *Config, logger *zap.Logger) ([]kgo.Opt, error) { kgo.SeedBrokers(cfg.Brokers...), kgo.MaxVersions(kversion.V2_6_0()), kgo.ClientID(cfg.ClientID), + kgo.RequiredAcks(kgo.LeaderAck()), } // Create Logger diff --git a/pkg/shop/frontend_service.go b/pkg/shop/frontend_service.go index d4bd359..f127b5b 100644 --- a/pkg/shop/frontend_service.go +++ b/pkg/shop/frontend_service.go @@ -113,8 +113,8 @@ func (svc *FrontendService) produceFrontendEvent(event fake.FrontendEvent) error // createKafkaTopic tries to create the Kafka topic func (svc *FrontendService) createKafkaTopic(ctx context.Context) error { cleanupPolicy := "delete" - retentionBytes := "1000000000" // 1GB - segmentBytes := "1000000" // 100MB + retentionBytes := "3000000000" // 3GB + segmentBytes := "300000000" // 300MB req := kmsg.CreateTopicsRequest{ Topics: []kmsg.CreateTopicsRequestTopic{ {