-
Notifications
You must be signed in to change notification settings - Fork 289
fix: resolve producer lookup failure when posting Reply messages #4070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ee30522
7fe500f
1f64572
839c460
7c47c08
ae70780
8176c88
06a7a6b
20c1c36
da71167
9bfd398
66fc585
ed04c52
736612c
f16577f
b4406b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,7 +146,9 @@ private async Task SendWithDelayAsync(Message message, TimeSpan? delay, bool use | |
| } | ||
|
|
||
| foreach (var (key, val) in message.Header.Bag | ||
| .Where(x => x.Key != HeaderNames.Keys && x.Key != HeaderNames.Tag)) | ||
| .Where(x => x.Key != HeaderNames.Keys | ||
| && x.Key != HeaderNames.Tag | ||
| && !MessageHeader.IsLocalHeader(x.Key))) | ||
|
Comment on lines
+149
to
+151
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ Getting worse: Complex Conditional
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same root cause as the cyclomatic-complexity thread: the new |
||
| { | ||
| builder.AddProperty(key, val.ToString()); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Getting worse: Complex Method
SendWithDelayAsync increases in cyclomatic complexity from 28 to 29, threshold = 9
Suppress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged. The +1 comes from adding
&& !MessageHeader.IsLocalHeader(x.Key)to the existing bag-filterWhereinSendWithDelayAsync— the smallest change that keeps the local header off the wire on the RocketMQ producer.SendWithDelayAsyncwas already at cyclomatic complexity 28 (threshold 9) before this PR; refactoring it is out of scope for a Reply-message bug fix. Leaving this thread open so it stays visible for a future cleanup.