ivan-ciklum commented on code in PR #263:
URL: https://github.com/apache/pulsar-dotpulsar/pull/263#discussion_r2099685630


##########
src/DotPulsar/Internal/SubConsumer.cs:
##########
@@ -237,4 +237,18 @@ private async ValueTask 
InternalAcknowledge(IEnumerable<MessageId> messageIds, C
 
     public ValueTask<IEnumerable<MessageId>> 
GetLastMessageIds(CancellationToken cancellationToken = default) =>
         throw new NotImplementedException();
+
+    public async ValueTask NegativeAcknowledge(MessageId messageId, 
CancellationToken cancellationToken)
+    {
+        var command = new CommandRedeliverUnacknowledgedMessages();

Review Comment:
   You are right, currently there are two RedeliverUnacknowledgedMessages 
methods: one to redeliver all pending messages and another to specify the 
specific messageIds that you want to redeliver.
   
   The difference I propose with NegativeAcknowledge is more conceptual and 
alignment with the official Apache Pulsar API. While 
RedeliverUnacknowledgedMessages is an explicit action requesting the redeliver 
of messages (either all or a selection), the NegativeAcknowledge method allows 
to signal message delivery failures in a more direct and “semantic” way, 
facilitating scenarios where the workflow requires marking certain messages for 
retry without necessarily manually managing the IDs to redeliver.
   
   In addition, some Pulsar clients implement NegativeAcknowledge allowing 
retry to occur after a defined interval, which can be useful in cases of 
temporary/intermittent failures.
   
   That said, if you consider that both methods 
(RedeliverUnacknowledgedMessages for specific IDs and all) already cover the 
use cases, we can close the topic here. If not, my proposal is to keep the 
discussion going to see if it brings value from the point of view of usability 
and alignment with the official API.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to