[GH-ISSUE #725] [FEATURE REQUEST] Support custom Redis cache key or prefix #1370

Open
opened 2026-03-07 22:09:00 +03:00 by kerem · 6 comments
Owner

Originally created by @shuqingzai on GitHub (Aug 21, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/725

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.

The asynq queue uses asynq as the RedisKey prefix. If my redis has multiple asynq service tasks, all of them will be merged. I hope that custom key or custom key:asynq can be used as a prefix to distinguish different ones Serve

Describe the solution you'd like

I hope that the configuration can customize the redis key prefix

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Originally created by @shuqingzai on GitHub (Aug 21, 2023). Original GitHub issue: https://github.com/hibiken/asynq/issues/725 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** The asynq queue uses `asynq` as the RedisKey prefix. If my redis has multiple asynq service tasks, all of them will be merged. I hope that `custom key` or `custom key:asynq` can be used as a prefix to distinguish different ones Serve **Describe the solution you'd like** I hope that the configuration can customize the redis key prefix **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here.
Author
Owner
<!-- gh-comment-id:1690188167 --> @shuqingzai commented on GitHub (Aug 23, 2023): Is it possible to make `asynq` in the following func into config options, allowing users to customize, the default is: `asynq` https://github.com/hibiken/asynq/blob/6b98c0bbaefbf37907fe4e0404e0408c6ad8a984/internal/base/base.go#L107 https://github.com/hibiken/asynq/blob/6b98c0bbaefbf37907fe4e0404e0408c6ad8a984/internal/base/base.go#L181 https://github.com/hibiken/asynq/blob/6b98c0bbaefbf37907fe4e0404e0408c6ad8a984/internal/base/base.go#L186 https://github.com/hibiken/asynq/blob/6b98c0bbaefbf37907fe4e0404e0408c6ad8a984/internal/base/base.go#L191 https://github.com/hibiken/asynq/blob/6b98c0bbaefbf37907fe4e0404e0408c6ad8a984/internal/base/base.go#L196 @hibiken
Author
Owner

@kamikazechaser commented on GitHub (Aug 24, 2023):

my redis has multiple asynq service tasks

You could use different redis db id/number (namespace) and create multiple lightweight go-redis connection pools for each of them.

<!-- gh-comment-id:1691011401 --> @kamikazechaser commented on GitHub (Aug 24, 2023): > my redis has multiple asynq service tasks You could use different redis db id/number (namespace) and create multiple lightweight go-redis connection pools for each of them.
Author
Owner

@hypnoglow commented on GitHub (Sep 7, 2023):

See: https://github.com/hibiken/asynq/pull/647

We ended up forking because we needed the prefix and Redis Cluster support in the CLI.

<!-- gh-comment-id:1710640298 --> @hypnoglow commented on GitHub (Sep 7, 2023): See: https://github.com/hibiken/asynq/pull/647 We ended up [forking](https://github.com/platacard/asynq) because we needed the prefix and Redis Cluster support in the CLI.
Author
Owner

@sunxunkang commented on GitHub (Dec 20, 2023):

我的redis有多个asynq服务任务

您可以使用不同的 redis db id/number(命名空间)并为每个数据库创建多个轻量级 go-redis 连接池。

redis cluster mode can not select db

<!-- gh-comment-id:1864242080 --> @sunxunkang commented on GitHub (Dec 20, 2023): > > 我的redis有多个asynq服务任务 > > 您可以使用不同的 redis db id/number(命名空间)并为每个数据库创建多个轻量级 go-redis 连接池。 redis cluster mode can not select db
Author
Owner

@hungtcs commented on GitHub (Jun 6, 2025):

+1.
This is a simple but very important function. I have also encountered the problem of namespace conflict at present.

<!-- gh-comment-id:2948514459 --> @hungtcs commented on GitHub (Jun 6, 2025): +1. This is a simple but very important function. I have also encountered the problem of namespace conflict at present.
Author
Owner

@xpufx commented on GitHub (Jan 10, 2026):

They probably want asynqmon to run with zero friction. Feature would be nice to have indeed.

<!-- gh-comment-id:3731143289 --> @xpufx commented on GitHub (Jan 10, 2026): They probably want asynqmon to run with zero friction. Feature would be nice to have indeed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#1370
No description provided.