mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[PR #1070] [MERGED] Feature: Add Headers Support to Tasks #3028
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#3028
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:feat/task-headers📝 Commits (3)
a01c62afeat(task): Add headers support to tasksdd0205ffix: cleanup copy map code5d9b596fix: 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.