Skip to content

feat: end to end wiring for per message nack#220

Merged
vaibhavtiwari33 merged 9 commits into
mainfrom
per-msg-nack
Jul 2, 2026
Merged

feat: end to end wiring for per message nack#220
vaibhavtiwari33 merged 9 commits into
mainfrom
per-msg-nack

Conversation

@vaibhavtiwari33

Copy link
Copy Markdown
Contributor

Closes #209

Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.00000% with 17 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@0c3b01c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
.../java/io/numaproj/numaflow/shared/NackOptions.java 77.77% 0 Missing and 4 partials ⚠️
.../java/io/numaproj/numaflow/sourcer/NackOffset.java 0.00% 4 Missing ⚠️
...main/java/io/numaproj/numaflow/sinker/Service.java 57.14% 0 Missing and 3 partials ⚠️
...java/io/numaproj/numaflow/batchmapper/Service.java 71.42% 0 Missing and 2 partials ⚠️
...aproj/numaflow/mapstreamer/OutputObserverImpl.java 75.00% 0 Missing and 2 partials ⚠️
...j/numaflow/sourcetransformer/TransformerActor.java 80.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #220   +/-   ##
=======================================
  Coverage        ?   61.30%           
  Complexity      ?      592           
=======================================
  Files           ?      157           
  Lines           ?     3634           
  Branches        ?      269           
=======================================
  Hits            ?     2228           
  Misses          ?     1229           
  Partials        ?      177           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vaibhavtiwari33 vaibhavtiwari33 requested review from syayi and yhl25 June 25, 2026 14:54
@vaibhavtiwari33 vaibhavtiwari33 self-assigned this Jun 29, 2026
@vaibhavtiwari33 vaibhavtiwari33 marked this pull request as ready for review June 29, 2026 16:10
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
@vaibhavtiwari33 vaibhavtiwari33 enabled auto-merge (squash) July 2, 2026 14:58
Comment on lines +21 to +40
public common.NackOptionsOuterClass.NackOptions toProto() {
common.NackOptionsOuterClass.NackOptions.Builder b =
common.NackOptionsOuterClass.NackOptions.newBuilder();
if (delay != null) {
b.setDelay(delay);
}
if (maxDeliveries != null) {
b.setMaxDeliveries(maxDeliveries);
}
if (reason != null) {
b.setReason(reason);
}
return b.build();
}

/** Converts from the incoming proto type. Returns null for null input. */
public static NackOptions fromProto(common.NackOptionsOuterClass.NackOptions p) {
if (p == null) {
return null;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these methods exposed to users?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as they currently stand, they are exposed to the users.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if I remember correctly we had this discussion when we wanted to add user/system metadata. These methods require to be public because the internal callers to these shared classes are in different packages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish java had access modifies similar to rust

Comment on lines +12 to +19
public class NackOptions {
/** redelivery delay in milliseconds. */
private final Long delay;
/** maximum number of redelivery attempts. */
private final Integer maxDeliveries;
/** human-readable reason for the nack. */
private final String reason;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just see if we can give an option for users to customise or add more options.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me do this in separate PR, since we need this in both core and SDK

@vaibhavtiwari33 vaibhavtiwari33 merged commit 7f129ed into main Jul 2, 2026
5 checks passed
@vaibhavtiwari33 vaibhavtiwari33 deleted the per-msg-nack branch July 2, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-Message Nack Support for Java SDK

2 participants