diff --git a/cmd/worker/main.go b/cmd/worker/main.go index 4116ef71..309bae9f 100644 --- a/cmd/worker/main.go +++ b/cmd/worker/main.go @@ -252,7 +252,7 @@ func main() { ConsumerGroup: "worker", ConsumerName: hostname, ConsumerConcurrency: config.Conf.Streams.GoroutineLimit, - MaxLen: 50000, + MaxLen: config.Conf.Streams.MaxLen, }, map[string]rpc.Listener{ "stream:gateway-events": event.NewEventListener( diff --git a/config/config.go b/config/config.go index 5b3298ce..50913d02 100644 --- a/config/config.go +++ b/config/config.go @@ -87,7 +87,8 @@ type ( } `envPrefix:"WORKER_REDIS_"` Streams struct { - GoroutineLimit int `env:"STREAMS_GOROUTINE_LIMIT" envDefault:"1000"` + GoroutineLimit int `env:"STREAMS_GOROUTINE_LIMIT" envDefault:"1000"` + MaxLen int64 `env:"STREAMS_MAX_LEN" envDefault:"50000"` } Prometheus struct {