GPrabhudas commented on a change in pull request #560:
URL: https://github.com/apache/pulsar-client-go/pull/560#discussion_r681605776
##########
File path: pulsar/producer_partition.go
##########
@@ -126,6 +129,23 @@ func newPartitionProducer(client *client, topic string,
options *ProducerOptions
p.producerName = options.Name
}
+ encryption := options.Encryption
+ // add default message crypto if not provided
+ if encryption != nil && len(encryption.Keys) > 0 &&
encryption.MessageCrypto == nil {
+ logCtx := fmt.Sprintf("[%v] [%v] [%v]", p.topic,
p.producerName, p.producerID)
+ messageCrypto, err := crypto.NewDefaultMessageCrypto(logCtx,
true, logger)
+ if err != nil {
+ logger.WithError(err).Error("Unable to get
MessageCrypto instance. Producer creation is abandoned")
Review comment:
Yes. Error is returned if generation of data key is failed. Here we are
logging the same error with other information.
--
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]