[FEATURE REQUEST] Task aggregation config by group
Author: rfid-qrCreated Apr 29, 2025Updated Jun 10, 2026
Labelsenhancementpr-welcome
Is your feature request related to a problem? Please describe. I have a situation where I want to process multiple group tasks, but there are some groups that need to have a different configuration than the others.
For example, set the default global config
- GroupMaxDelay 10 minutes
- GroupGracePeriod 2 * time.Minute
- GroupMaxSize 20
For group A, it's okay to use the config from the default global config. but for Group B, I need different configs, for example GroupGracePeriod set to 1 minute or GroupMaxSize set to 50
Describe the solution you'd like Support config by group name, maybe something like this
asynq.Config{
Queues: map[string]int{"notifications": 1},
GroupAggregator: asynq.GroupAggregatorFunc(aggregate),
GroupMaxDelay: 10 * time.Minute,
GroupGracePeriod: 2 * time.Minute,
GroupMaxSize: 20,
GroupConfigs : map[string]asynq.GroupConfig{
GroupMaxDelay: 5 * time.Minute,
GroupGracePeriod: 1 * time.Minute,
GroupMaxSize: 30,
}
},Source: hibiken/asynq