[GH-ISSUE #196] [FEATURE REQUEST] Shared and Dedicated Queue Workers with strategy #1078

Closed
opened 2026-03-07 22:05:19 +03:00 by kerem · 2 comments
Owner

Originally created by @sujit-baniya on GitHub (Sep 17, 2020).
Original GitHub issue: https://github.com/hibiken/asynq/issues/196

Originally assigned to: @hibiken on GitHub.

Shared Queue Workers:

  • As a developer, I would define all required queues (with priorities), no. of workers required for each queues
  • Apply different strategies to dispatch to queues with appropriate priorities.
    ROUND-ROBIN strategy - Whichever queue is free, send to that queue irrespective of queue priorities,
    WEIGHTED strategy - Send to queue with appropriate queue based on messages. High volume messages would go with high priority queue,
    CUSTOM strategy - Admin defines the strategy for user. If userA is set to high priority, his messages will go to high priority queue

Probably making use of mux.Handle("queue", handler)

Dedicate Queue Workers:

  • Everything from Shared Queue workers.
  • Queues and workers are created per user dedicated to them only.

Probably making use of mux.HandleFunc("queue:12", handler)

Originally created by @sujit-baniya on GitHub (Sep 17, 2020). Original GitHub issue: https://github.com/hibiken/asynq/issues/196 Originally assigned to: @hibiken on GitHub. Shared Queue Workers: - As a developer, I would define all required queues (with priorities), no. of workers required for each queues - Apply different strategies to dispatch to queues with appropriate priorities. ROUND-ROBIN strategy - Whichever queue is free, send to that queue irrespective of queue priorities, WEIGHTED strategy - Send to queue with appropriate queue based on messages. High volume messages would go with high priority queue, CUSTOM strategy - Admin defines the strategy for user. If userA is set to high priority, his messages will go to high priority queue Probably making use of `mux.Handle("queue", handler)` Dedicate Queue Workers: - Everything from Shared Queue workers. - Queues and workers are created per user dedicated to them only. Probably making use of `mux.HandleFunc("queue:12", handler)`
kerem 2026-03-07 22:05:19 +03:00
Author
Owner

@sujit-baniya commented on GitHub (Sep 17, 2020):

https://github.com/hibiken/asynq/issues/194

<!-- gh-comment-id:693763132 --> @sujit-baniya commented on GitHub (Sep 17, 2020): https://github.com/hibiken/asynq/issues/194
Author
Owner

@hibiken commented on GitHub (Sep 20, 2020):

You could use Inspector.CurrentStats to inspect the size of the queue. You can implement strategies listed above in your application code. I don't think we want to implement this at this package level (at least for now).

<!-- gh-comment-id:695675313 --> @hibiken commented on GitHub (Sep 20, 2020): You could use `Inspector.CurrentStats` to inspect the size of the queue. You can implement strategies listed above in your application code. I don't think we want to implement this at this package level (at least for now).
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#1078
No description provided.