feat: end to end wiring for per message nack#220
Conversation
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 Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
| 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; | ||
| } |
There was a problem hiding this comment.
are these methods exposed to users?
There was a problem hiding this comment.
Yes, as they currently stand, they are exposed to the users.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I wish java had access modifies similar to rust
| 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; | ||
|
|
There was a problem hiding this comment.
Just see if we can give an option for users to customise or add more options.
There was a problem hiding this comment.
Let me do this in separate PR, since we need this in both core and SDK
Closes #209