[PR #1070] [MERGED] Feature: Add Headers Support to Tasks #1007

Closed
opened 2026-03-02 06:28:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/1070
Author: @joejoe-am
Created: 8/27/2025
Status: Merged
Merged: 11/4/2025
Merged by: @kamikazechaser

Base: masterHead: feat/task-headers


📝 Commits (3)

  • a01c62a feat(task): Add headers support to tasks
  • dd0205f fix: cleanup copy map code
  • 5d9b596 fix: Add tests

📊 Changes

9 files changed (+653 additions, -255 deletions)

View changed files

📝 aggregator.go (+1 -1)
📝 asynq.go (+33 -7)
📝 client.go (+1 -0)
📝 client_test.go (+470 -0)
📝 internal/base/base.go (+5 -0)
📝 internal/proto/asynq.pb.go (+135 -243)
📝 internal/proto/asynq.proto (+4 -1)
📝 processor.go (+3 -2)
📝 recoverer.go (+1 -1)

📄 Description

This MR introduces headers as first-class metadata on Task.
Headers allow attaching cross-cutting metadata (e.g., trace IDs, tenant IDs, feature flags) without mixing them into the business payload.

Motivation
• Resolves Issue #393 (support for headers/metadata).
• There was an earlier attempt in PR #838, but it became stale and was never merged. This MR picks up the idea, updates it for the current codebase, and ensures backward compatibility.

This MR supersedes #838 and #606 and closes #393.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/1070 **Author:** [@joejoe-am](https://github.com/joejoe-am) **Created:** 8/27/2025 **Status:** ✅ Merged **Merged:** 11/4/2025 **Merged by:** [@kamikazechaser](https://github.com/kamikazechaser) **Base:** `master` ← **Head:** `feat/task-headers` --- ### 📝 Commits (3) - [`a01c62a`](https://github.com/hibiken/asynq/commit/a01c62a79a6319da6abc4e75938570928c3f85fc) feat(task): Add headers support to tasks - [`dd0205f`](https://github.com/hibiken/asynq/commit/dd0205fec7cf90646eae90d3c51eb3b18fc9e03e) fix: cleanup copy map code - [`5d9b596`](https://github.com/hibiken/asynq/commit/5d9b59668a59b04daa11f68fe0839db2c5ae4ac5) fix: Add tests ### 📊 Changes **9 files changed** (+653 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `aggregator.go` (+1 -1) 📝 `asynq.go` (+33 -7) 📝 `client.go` (+1 -0) 📝 `client_test.go` (+470 -0) 📝 `internal/base/base.go` (+5 -0) 📝 `internal/proto/asynq.pb.go` (+135 -243) 📝 `internal/proto/asynq.proto` (+4 -1) 📝 `processor.go` (+3 -2) 📝 `recoverer.go` (+1 -1) </details> ### 📄 Description This MR introduces headers as first-class metadata on Task. Headers allow attaching cross-cutting metadata (e.g., trace IDs, tenant IDs, feature flags) without mixing them into the business payload. Motivation • Resolves [Issue #393](https://github.com/hibiken/asynq/issues/393) (support for headers/metadata). • There was an earlier attempt in [PR #838](https://github.com/hibiken/asynq/pull/838), but it became stale and was never merged. This MR picks up the idea, updates it for the current codebase, and ensures backward compatibility. ✅ This MR supersedes #838 and #606 and closes #393. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 06:28:48 +03:00
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#1007
No description provided.