feat: Support for on success sink#207
Conversation
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
…lculation Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #207 +/- ##
=======================================
Coverage ? 60.78%
Complexity ? 517
=======================================
Files ? 152
Lines ? 3448
Branches ? 242
=======================================
Hits ? 2096
Misses ? 1181
Partials ? 171 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
| .setOnSuccessMsg(response.getOnSuccessMessage() == null | ||
| ? SinkOuterClass.SinkResponse.Result.Message.getDefaultInstance() | ||
| : response.getOnSuccessMessage()) |
There was a problem hiding this comment.
The current numaflow-core implementation for accepting onSuccess response from server allows sending None in lieu of explicit OnSuccessMessage, but the generated java protobuf for OnSuccessMessage prohibits setting the OnSuccessMessage as null, so a default instance is being sent to the client currently.
This leads to discrepancy between behaviours across different SDKs.
Question: Should we add functionality to numaflow-core to interpret empty value ("") as an indication of sending original message to the onSuccess sink?
…changes Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
…changes Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
|
Please add java doc for public classes. |
Signed-off-by: vtiwari5 <vaibhav_tiwari1@intuit.com>
Closes #206
As part of #3043, we're adding support for OnSuccess sink which allows users to write to a separate sink when writing to primary sink succeeds for example.
This PR aims to add this support to Java SDK as well, giving the users ability to interact with the onSuccess sink.
Local testing:
Brought up a pipeline with a UDSink using java SDK with latest changes:

Able to see messages in the onSuccess UDSink being routed from the primary UDSink:

Mix of messages being written to fallback and onsuccess sink:
