diff --git a/cmd/producer/main.go b/cmd/producer/main.go index 608e811..a0fd1db 100644 --- a/cmd/producer/main.go +++ b/cmd/producer/main.go @@ -173,7 +173,7 @@ func run(ctx context.Context) int { } // Creating throttler - throttler, err := throttling.New(throttling.WithInMemoryGCRA(0)) + throttler, err := throttling.New(throttling.WithInMemoryGCRA(int64(maxEventsPerSecond))) if err != nil { printErr(fmt.Errorf("cannot create throttler: %v", err)) return 1