massakam commented on a change in pull request #138:
URL: https://github.com/apache/pulsar-client-node/pull/138#discussion_r559977594



##########
File path: tests/end_to_end.test.js
##########
@@ -665,5 +669,87 @@ const Pulsar = require('../index.js');
       await consumer.close();
       await client.close();
     });
+    test('Basic produce and consume encryption', async () => {
+      const client = new Pulsar.Client({
+        serviceUrl: 'pulsar://localhost:6650',
+        operationTimeoutSeconds: 30,
+      });
+
+      const topic = 'persistent://public/default/encryption-produce-consume';
+      const producer = await client.createProducer({
+        topic,
+        sendTimeoutMs: 30000,
+        batchingEnabled: true,
+        publicKeyPath: './certificate/public-rsa.pem',
+        privateKeyPath: './certificate/private-rsa.pem',
+        encryptionKey: 'encryption-key',
+      });
+
+      const consumer = await client.subscribe({
+        topic,
+        subscription: 'sub1',
+        subscriptionType: 'Shared',
+        ackTimeoutMs: 10000,
+        publicKeyPath: './public-rsa.pem',
+        privateKeyPath: './private-rsa.pem',

Review comment:
       Are these paths correct?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to