GPrabhudas commented on a change in pull request #612:
URL: https://github.com/apache/pulsar-client-go/pull/612#discussion_r704587154
##########
File path: pulsar/consumer_partition.go
##########
@@ -479,7 +505,49 @@ func (pc *partitionConsumer) MessageReceived(response
*pb.CommandMessage, header
return err
}
- uncompressedHeadersAndPayload, err := pc.Decompress(msgMeta,
headersAndPayload)
+ decryptedPayload, err :=
pc.decryptor.Decrypt(headersAndPayload.ReadableSlice(), pbMsgID, msgMeta)
+ messages := make([]*message, 0)
+
+ // error decrypting the payload
+ if err != nil {
+ pc.log.Error(err)
+ switch pc.decryptor.CryptoFailureAction() {
+ case crypto.ConsumerCryptoFailureActionFail:
+ pc.log.Errorf("consuming message failed due to
decryption err :%v", err)
Review comment:
yeah, but i don't think it is good idea to do `ack`.
Let's say user wants to consume this message again by providing proper
crypto configuration, if we do `ack`, then he may not be able to consume.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]