From 571ad81e8a1f018254cf69f5d9ee3409692b536b Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Thu, 28 Dec 2023 14:25:14 +0800 Subject: [PATCH] Document the requirement for the send_async method See https://github.com/apache/pulsar-client-python/issues/184 It should be documented that the callback should not throw any exception when passed to `send_async`. --- pulsar/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pulsar/__init__.py b/pulsar/__init__.py index 92cf10f..a44a0db 100644 --- a/pulsar/__init__.py +++ b/pulsar/__init__.py @@ -1237,6 +1237,8 @@ def send_async(self, content, callback, -------- The ``callback`` will be invoked once the message has been acknowledged by the broker. + Users are responsible to handle the exception inside the callback. If any exception was + thrown from the callback, the process would terminate immediately. .. code-block:: python