[TT-15560] added batchbytes configs and unit testing for kafka#889
[TT-15560] added batchbytes configs and unit testing for kafka#889andrei-tyk merged 9 commits intomasterfrom
Conversation
🔍 Code Analysis ResultsThis PR introduces a new configuration option, Files Changed Analysis
Architecture & Impact AssessmentWhat this PR accomplishesThis PR enhances the Kafka pump by exposing the Key technical changes introduced
Affected system components
Configuration Flow Diagramgraph TD
subgraph "User Configuration"
A["pump.conf (JSON) <br> \"batch_bytes\": 1048576"]
B["Environment Variable <br> TYK_PMP_PUMPS_KAFKA_META_BATCHBYTES"]
end
subgraph "Tyk Pump Initialization"
C["KafkaPump.Init()"]
D["kafkaConf.BatchBytes"]
E{Validation <br> if BatchBytes < 0}
F["writerConfig.BatchBytes = 0 <br> (kafka-go default)"]
G["writerConfig.BatchBytes = kafkaConf.BatchBytes"]
end
subgraph "Kafka Producer"
H["kafka.WriterConfig"]
I["kafka.Writer"]
end
B -- Overrides --> A
A --> C
C --> D
D --> E
E -- Yes --> F
E -- No --> G
F --> H
G --> H
H --> I
Scope Discovery & Context ExpansionThe changes are well-contained within the Kafka pump implementation ( The new unit tests in A potential point of discussion is the handling of invalid (negative) input. The current implementation logs an error and uses a default value. An alternative approach would be to "fail fast" by returning an error from Metadata
Powered by Visor from Probelabs Last updated: 2025-10-13T09:03:24.463Z | Triggered by: synchronize | Commit: 02c34db |
🔍 Code Analysis ResultsSecurity Issues (2)
Performance Issues (1)
Quality Issues (2)
Style Issues (1)
Powered by Visor from Probelabs Last updated: 2025-10-13T09:03:25.969Z | Triggered by: synchronize | Commit: 02c34db |
Description
Added the
BatchBytesconfiguration for the KafkawriterConfig.Related Issue
TT-15560
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
fork, don't request your
master!masterbranch (left side). Also, you should startyour branch off our latest
master.go mod tidy && go mod vendorgo fmt -sgo vet