<@U078Y59KC3B> The documentation for <retry letter...
# ask-ai
s
@RunLLM The documentation for retry letter topic notes that "messages in the retry letter topic are persisted to BookKeeper, while messages that need to be retried due to negative acknowledgment are cached on the client side.". Is the behavior applicable for Go Pulsar client as well? If I NACK a message, will it be sent to retry letter topic or will it be cached on the client for retry?
r
For the Go Pulsar client, if you NACK a message, it will not be sent to the retry letter topic. Instead, the message is cached on the client side and redelivered after a configurable delay. Only messages explicitly sent using
ReconsumeLater
are persisted to the retry letter topic; NACKed messages use the client-side cache and are not persisted to BookKeeper by default. This matches the behavior described in the documentation for Java clients and is confirmed for Go as well according to Pulsar Go client issue #603 and Pulsar Go client PR #359. Would you like more detail on how to configure or use these features in the Go client? Sources: - Pulsar Go client PR #359 - Pulsar Go client issue #603 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM if a message is NACKed for a shared subscription, would it still be handled on the client side without sending it to retry letter topic for Go Pulsar client?
r
Yes, for the Go Pulsar client, NACKed messages in a shared subscription are handled on the client side and are not sent to the retry letter topic. The message is cached by the client and redelivered after a delay, rather than being persisted to BookKeeper or moved to a retry letter topic. This is confirmed in Pulsar Go client issue #603 and Pulsar Go client issue #403. Would you like more detail on configuring retry or dead letter topics in the Go client? Sources: - Pulsar Go client issue #403 - Pulsar Go client issue #603 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM are there any constraints for the minimum and maximum delay that can be specified when we invoke
ReconsumeLater
?
r
The official documentation and Go client source do not specify strict minimum or maximum delay constraints for
ReconsumeLater
. However, if a negative value is provided, it is set to zero internally, and the delay is specified as a
time.Duration
in Go, which is a 64-bit integer nanoseconds value (consumer_impl.go). There is no explicit upper bound enforced in the Go client, but extremely large values may be limited by system or broker configuration. Would you like more detail on how delays are handled or any broker-side implications? Sources: - consumer_impl.go 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM If I call
ReconsumeLater
for a message, do I need to acknowledge it as well?
r
No, if you call
ReconsumeLater
for a message, you do not need to acknowledge it. The message will be scheduled for redelivery after the specified delay, and acknowledgment is not required or expected in this case (Pulsar Go client issue #603, PR #359). Would you like more detail on the message lifecycle when using
ReconsumeLater
? Sources: - Pulsar Go client issue #603 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM in that case how does the message on the original topic and subscription get acknowledged?
r
When you call
ReconsumeLater
, the original message is not acknowledged immediately. Instead, the message is republished to the retry letter topic with updated properties (such as retry count), and the consumer automatically subscribes to both the original and retry topics. The message is only acknowledged on the original topic and subscription when it is successfully processed and explicitly acknowledged by the consumer after redelivery (Pulsar 4.0.x concepts-messaging). Would you like more detail on the flow between retry, dead letter, and original topics? Sources: - Pulsar 4.0.x concepts-messaging 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM when a message is delivered for the 1st time, what would be the value for
Message.RedeliveryCount
?
r
When a message is delivered for the first time,
Message.RedeliveryCount
will be 0 (Pulsar Go client source, Pulsar concepts-messaging docs). Would you like more detail on how this value changes with redeliveries? Sources: - Pulsar Go client source - Pulsar concepts-messaging docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.