Skip to content

Commit

Permalink
Increasing kafkaa producer limit from 1MB(default) -> 8MB
Browse files Browse the repository at this point in the history
  • Loading branch information
prdpx7 committed Jan 16, 2025
1 parent 5aacd05 commit 52b1e61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BENCHMARK = BenchmarkRAWInput
TEST = TestRawListenerBench
BIN_NAME = gor
VERSION := DEV-$(shell date +%s)
CUSTOM_TAGS := --tags "ngo$(if $(CUSTOM_BUILD_TAGS), $(CUSTOM_BUILD_TAGS),)"
CUSTOM_TAGS := -buildvcs=false --tags "ngo$(if $(CUSTOM_BUILD_TAGS), $(CUSTOM_BUILD_TAGS),)"
LDFLAGS = -ldflags "-X main.VERSION=$(VERSION) -extldflags \"-static\" -X main.DEMO=$(DEMO)"
MAC_LDFLAGS = -ldflags "-X main.VERSION=$(VERSION) -X main.DEMO=$(DEMO)"
DOCKER_FPM_CMD := docker run --rm -t -v `pwd`:/src -w /src fleetdm/fpm
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Check [latest documentation](http://github.com/buger/goreplay/wiki).
## Installation
Download the latest binary from https://github.com/buger/goreplay/releases or [compile by yourself](https://github.com/buger/goreplay/wiki/Compilation).

### Building Locally
To create a release compatible for linux distro
```bash
make release-bin-linux-amd64
```

## Getting started

The most basic setup will be `sudo ./gor --input-raw :8000 --output-stdout` which acts like tcpdump.
Expand Down
1 change: 1 addition & 0 deletions output_kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func NewKafkaOutput(_ string, config *OutputKafkaConfig, tlsConfig *KafkaTLSConf
c.Producer.RequiredAcks = sarama.WaitForLocal
c.Producer.Compression = sarama.CompressionSnappy
c.Producer.Flush.Frequency = KafkaOutputFrequency * time.Millisecond
c.Producer.MaxMessageBytes = 8 * 1024 * 1024 // 8 MB

brokerList := strings.Split(config.Host, ",")

Expand Down

0 comments on commit 52b1e61

Please sign in to comment.