You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/05/09 07:53:29 UTC

[pulsar] branch master updated: [Doc] Add doc for `CommandAckResponse` (#15497)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new c49a977de4b [Doc] Add doc for `CommandAckResponse` (#15497)
c49a977de4b is described below

commit c49a977de4b0b525ec80e5070bc90eddcc7cddad
Author: Xiangying Meng <55...@users.noreply.github.com>
AuthorDate: Mon May 9 15:53:20 2022 +0800

    [Doc] Add doc for `CommandAckResponse` (#15497)
---
 site2/docs/developing-binary-protocol.md | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/site2/docs/developing-binary-protocol.md b/site2/docs/developing-binary-protocol.md
index 482dcc804a6..8ad4bd388da 100644
--- a/site2/docs/developing-binary-protocol.md
+++ b/site2/docs/developing-binary-protocol.md
@@ -418,7 +418,24 @@ Parameters:
  * `txnid_least_bits` -> *(optional)* The ID of the transaction opened in a TC,
    `txnid_most_bits` and `txnid_least_bits`uniquely identify a transaction.
  * `request_id` -> *(optional)* ID for handling response and timeout.
-   
+
+##### Command AckResponse
+
+An `AckResponse` is the broker’s response to acknowledge a request sent by the client. It contains the `consumer_id` sent in the request.
+If a transaction is used, it contains both Transaction ID and Request ID that are sent in the request.
+The client finishes the specific request according to the Request ID.
+If the `error` field is set, it indicates that the request has failed.
+
+Example of ack response with redirection:
+
+```protobuf
+message CommandAckResponse {
+    "consumer_id" : 1,
+    "txnid_least_bits" = 0,
+    "txnid_most_bits" = 1,
+    "request_id" = 5
+}
+```
 
 ##### Command CloseConsumer