From e1ab136a139a19c431f07cf880aba14e85c59e5f Mon Sep 17 00:00:00 2001 From: Mukunda Rao Katta Date: Sun, 26 Apr 2026 10:55:42 -0700 Subject: [PATCH] docs(producer): clarify SendAsync description Clarify that SendAsync completes in the background and signals completion via the user-supplied callback, and qualify the queue-full blocking behavior with the DisableBlockIfQueueFull option (issue apache/pulsar#23643). --- pulsar/producer.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pulsar/producer.go b/pulsar/producer.go index 633e761af1..c8b6b09cb3 100644 --- a/pulsar/producer.go +++ b/pulsar/producer.go @@ -231,8 +231,11 @@ type Producer interface { // producer.Send(ctx, pulsar.ProducerMessage{ Payload: myPayload }) Send(context.Context, *ProducerMessage) (MessageID, error) - // SendAsync a message in asynchronous mode - // This call is blocked when the `maxPendingMessages` becomes full (default: 1000) + // SendAsync a message in asynchronous mode. The send operation completes in the background + // and the provided callback is invoked once the broker acknowledges the message (or when + // the publish fails), so the caller can continue without waiting for the result. + // This call is blocked when the `maxPendingMessages` becomes full (default: 1000) unless + // `DisableBlockIfQueueFull` is set to true, in which case it returns an error immediately. // The callback will report back the message being published and // the eventual error in publishing // The context passed in the call is only used for the duration of the SendAsync call itself