trexinc commented on a change in pull request #6763:
URL: https://github.com/apache/pulsar/pull/6763#discussion_r416829051
##########
File path: site2/docs/security-encryption.md
##########
@@ -78,18 +78,20 @@ class RawFileKeyReader implements CryptoKeyReader {
return keyInfo;
}
}
-PulsarClient pulsarClient = PulsarClient.create("http://localhost:8080");
-ProducerConfiguration prodConf = new ProducerConfiguration();
-prodConf.setCryptoKeyReader(new RawFileKeyReader("test_ecdsa_pubkey.pem",
"test_ecdsa_privkey.pem"));
-prodConf.addEncryptionKey("myappkey");
+PulsarClient pulsarClient =
PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();
-Producer producer =
pulsarClient.createProducer("persistent://my-tenant/my-ns/my-topic", prodConf);
+Producer producer = pulsarClient.newProducer()
+ .topic("persistent://my-tenant/my-ns/my-topic")
+ .addEncryptionKey("myappkey")
Review comment:
Well, it works fine if you add this dependency:
compile group: 'org.apache.pulsar', name: 'pulsar-client-messagecrypto-bc',
version: '2.5.1'
Don't know if this a bug or this is how it is supposed to be now with the
whole addition of bcfips support.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]