Repository navigation
[fix][client] Copy orderingKey to retry letter topic and DLQ messages and fix bug in copying - #23182
Merged
Merged
Conversation
lhotari
requested review from
Technoboy-,
codelipenghui,
dao-jun,
dlg99,
eolivelli,
hezhangjian,
nicoloboschi and
poorbarcode
August 15, 2024 19:18
Contributor
|
/pulsarbot rerun-failure-checks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23182 +/- ##
============================================
+ Coverage 73.57% 74.58% +1.01%
- Complexity 32624 33670 +1046
============================================
Files 1877 1921 +44
Lines 139502 144486 +4984
Branches 15299 15809 +510
============================================
+ Hits 102638 107766 +5128
+ Misses 28908 28473 -435
- Partials 7956 8247 +291
Flags with carried forward coverage won't be shown. Click here to find out more.
|
liangyepianzhou
approved these changes
Aug 16, 2024
lhotari
added a commit
that referenced
this pull request
Aug 16, 2024
lhotari
added a commit
that referenced
this pull request
Aug 16, 2024
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Aug 16, 2024
… and fix bug in copying (apache#23182) Fixes apache#23173 Fixes apache#23181 See apache#23173 and apache#23181 - copy ordering key to messages sent to retry letter topic and DLQ topic (cherry picked from commit 67fc5b9) (cherry picked from commit c83428f)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Aug 16, 2024
… and fix bug in copying (apache#23182) Fixes apache#23173 Fixes apache#23181 See apache#23173 and apache#23181 - copy ordering key to messages sent to retry letter topic and DLQ topic (cherry picked from commit 67fc5b9) (cherry picked from commit c83428f)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Aug 20, 2024
… and fix bug in copying (apache#23182) Fixes apache#23173 Fixes apache#23181 See apache#23173 and apache#23181 - copy ordering key to messages sent to retry letter topic and DLQ topic (cherry picked from commit 67fc5b9) (cherry picked from commit c83428f)
grssam
pushed a commit
to grssam/pulsar
that referenced
this pull request
Sep 4, 2024
… and fix bug in copying (apache#23182) Fixes apache#23173 Fixes apache#23181 ### Motivation See apache#23173 and apache#23181 ### Modifications - copy ordering key to messages sent to retry letter topic and DLQ topic
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
… and fix bug in copying (apache#23182) Fixes apache#23173 Fixes apache#23181 ### Motivation See apache#23173 and apache#23181 ### Modifications - copy ordering key to messages sent to retry letter topic and DLQ topic
3 tasks done
1 task done
RobertIndie
pushed a commit
to apache/pulsar-client-go
that referenced
this pull request
Aug 7, 2025
…meLater() (#1392) Fixes #1388 Master Issue: #907, apache/pulsar#23182 ### Motivation Since pulsar sdk does not support `AckTimeout()` method, we can only use `Nack()` or `ReconsumeLater()` to trigger dlq policy and send messages to dlq. We can find system properties(e.g. `REAL_TOPIC` and `ORIGIN_MESSAGE_ID`) in these dlq messages. Refer to issue #1388, before pr #907 `dlq_router#run()` will directly copy properties to create a new dlq message when receiving a message from `dlq.Chan()`. But we only define message properties in ReconsumeLater's `ReconsumeLaterWithCustomProperties()` and not in Nack's `dispatcher()` before send to this `dlq.Chan()`, which lead to only dlq messages created by `ReconsumeLater()` can have these properties. The above pr replaced this behavior with just adding system properties as soon as creating dlq messages in `dlq_router#run()`, which use `message.topic` as `REAL_TOPIC` property value. But messages sent from `ReconsumeLater() ReconsumeLaterWithCustomProperties()` do not contain related `message.topic` fields, in case it will override defined `REAL_TOPIC` to empty string. ### Modifications - Add `REAL_TOPIC`, `ORIGIN_MESSAGE_IDY_TIME`, `ORIGIN_MESSAGE_ID` system properties both in ReconsumeLater's `ReconsumeLaterWithCustomProperties()` and Nack's `dispatcher()` functions. - Add `Key`, `OrderingKey`, `EventTime` message fields both in `ReconsumeLater() ReconsumeLaterWithCustomProperties()` and `dlq_router run()` functions to keep consistent with [Java realization](apache/pulsar#23182), so that dlq messages can preserve source message info. - Remove adding system properties strategy in `dlq_router#run()`.
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.
Fixes #23173
Fixes #23181
Motivation
See #23173 and #23181
Modifications
Documentation
docdoc-requireddoc-not-neededdoc-complete