You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/23 08:00:20 UTC

[GitHub] [pulsar-client-go] wolfstudy opened a new pull request, #776: Support ack response for Go SDK

wolfstudy opened a new pull request, #776:
URL: https://github.com/apache/pulsar-client-go/pull/776

   Signed-off-by: xiaolongran <xi...@tencent.com>
   
   ### Motivation
   
   Follow https://github.com/apache/pulsar/pull/8161, support Ack Response Command for Go SDK
   
   ### Modifications
   
   - Add `AckWithResponse` in `ConsumerOptions` struct
   
   


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar-client-go] wolfstudy merged pull request #776: Support ack response for Go SDK

Posted by GitBox <gi...@apache.org>.
wolfstudy merged PR #776:
URL: https://github.com/apache/pulsar-client-go/pull/776


-- 
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-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar-client-go] congbobo184 commented on a diff in pull request #776: Support ack response for Go SDK

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on code in PR #776:
URL: https://github.com/apache/pulsar-client-go/pull/776#discussion_r880018280


##########
pulsar/consumer_partition.go:
##########
@@ -525,12 +526,22 @@ func (pc *partitionConsumer) internalAck(req *ackRequest) {
 		EntryId:  proto.Uint64(uint64(msgID.entryID)),
 	}
 
+	reqID := pc.client.rpcClient.NewRequestID()
 	cmdAck := &pb.CommandAck{
 		ConsumerId: proto.Uint64(pc.consumerID),
 		MessageId:  messageIDs,
 		AckType:    pb.CommandAck_Individual.Enum(),
 	}
 
+	if pc.options.ackWithResponse {
+		_, err := pc.client.rpcClient.RequestOnCnx(pc._getConn(), reqID, pb.BaseCommand_ACK, cmdAck)
+		if err != nil {
+			pc.log.WithError(err).Error("Ack with response error")

Review Comment:
   should handle the callback?



-- 
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-unsubscribe@pulsar.apache.org

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