Add DeadLetterPublisher for publishing poisoned messages to a DLQ topic - #5089
Open
mauriceyap wants to merge 1 commit into
Open
Add DeadLetterPublisher for publishing poisoned messages to a DLQ topic#5089mauriceyap wants to merge 1 commit into
mauriceyap wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryAdds a reusable Pulsar dead-letter publishing capability.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains within the scope of the available previous review threads.
|
| Filename | Overview |
|---|---|
| internal/common/pulsarutils/dlq_publisher.go | Adds the dead-letter metadata model and a self-contained asynchronous Pulsar publisher with timeout and close handling. |
| internal/common/pulsarutils/dlq.go | Adds a helper that converts Pulsar message IDs to their string representations. |
| internal/common/pulsarutils/doc.go | Adds package documentation covering Pulsar construction and publishing helpers. |
Sequence Diagram
sequenceDiagram
participant Caller
participant DLP as DeadLetterPublisher
participant Producer as Pulsar Producer
participant DLQ as Dead-letter Topic
Caller->>DLP: Publish(ctx, payload, metadata)
DLP->>DLP: Create timeout context
DLP->>DLP: Convert metadata to properties
DLP->>Producer: SendAsync(payload, properties)
Producer->>DLQ: Publish message
Producer-->>DLP: Completion callback
DLP-->>Caller: Success or wrapped error
Reviews (5): Last reviewed commit: "Add DeadLetterPublisher for publishing p..." | Re-trigger Greptile
|
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
mauriceyap
force-pushed
the
dlq-ingester-4
branch
from
August 4, 2026 10:16
77afd9c to
3807e89
Compare
mauriceyap
force-pushed
the
dlq-ingester-4
branch
from
August 4, 2026 15:40
3807e89 to
faa9075
Compare
mauriceyap
force-pushed
the
dlq-ingester-4
branch
from
August 5, 2026 15:53
faa9075 to
b623f94
Compare
nikola-jokic
previously approved these changes
Aug 5, 2026
A new self-contained `pulsarutils.DeadLetterPublisher` which wraps a Pulsar producer, publishes a payload plus `DeadLetterMetadata` (original topic, subscription, attempt count, last error, message IDs) as message properties. Also adds `MessageIdsToStrings`, a small helper for rendering `[]pulsar.MessageID` as strings for serialization. (Not wired into anything yet, so this PR is inert with respect to running behaviour — pure new capability, reviewable purely on its own correctness - producer options, timeout handling, error wrapping). Signed-off-by: Maurice Yap <mauriceyap@hotmail.co.uk>
mauriceyap
force-pushed
the
dlq-ingester-4
branch
from
August 6, 2026 10:07
b623f94 to
c6a844a
Compare
nikola-jokic
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new self-contained
pulsarutils.DeadLetterPublisherwhich wraps a Pulsar producer, publishes a payload plusDeadLetterMetadata(original topic, subscription, attempt count, last error, message IDs) as message properties. Also addsMessageIdsToStrings, a small helper for rendering[]pulsar.MessageIDas strings for serialization.(Not wired into anything yet, so
this PR is inert with respect to running behaviour — pure new capability, reviewable purely on its own correctness - producer options, timeout handling, error wrapping).