You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/25 02:52:38 UTC

[GitHub] [pulsar-client-node] equanz opened a new pull request #137: Return MessageId as promise resolve at Producer#send

equanz opened a new pull request #137:
URL: https://github.com/apache/pulsar-client-node/pull/137


   Fixes https://github.com/apache/pulsar-client-node/issues/94
   
   ### Motivation
   We want to get MessageId at `Producer#send` method.
   
   ### Modifications
   * Change Producer#send Promise response
     - from `Promise<null>` to `Promise<Object>`
     - return MessageId as `Promise<Object>`
   * Change C++ library version to to `2.7.0`
     - because of https://github.com/apache/pulsar/pull/7439
   
   ### Verifying this change
   Add end-to-end test to test cases.
   


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



[GitHub] [pulsar-client-node] massakam merged pull request #137: Return MessageId as promise resolve at Producer#send

Posted by GitBox <gi...@apache.org>.
massakam merged pull request #137:
URL: https://github.com/apache/pulsar-client-node/pull/137


   


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



[GitHub] [pulsar-client-node] equanz commented on pull request #137: Return MessageId as promise resolve at Producer#send

Posted by GitBox <gi...@apache.org>.
equanz commented on pull request #137:
URL: https://github.com/apache/pulsar-client-node/pull/137#issuecomment-751180609


   PTAL


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



[GitHub] [pulsar-client-node] equanz commented on a change in pull request #137: Return MessageId as promise resolve at Producer#send

Posted by GitBox <gi...@apache.org>.
equanz commented on a change in pull request #137:
URL: https://github.com/apache/pulsar-client-node/pull/137#discussion_r548805737



##########
File path: tests/end_to_end.test.js
##########
@@ -665,5 +665,54 @@ const Pulsar = require('../index.js');
       await consumer.close();
       await client.close();
     });
+
+    test('Produce/Consume and validate MessageId', async () => {
+      const client = new Pulsar.Client({
+        serviceUrl: 'pulsar://localhost:6650',
+        operationTimeoutSeconds: 30,
+      });
+
+      const topic = 'persistent://public/default/produce-consume-message-id';
+      const producer = await client.createProducer({
+        topic,
+        sendTimeoutMs: 30000,
+        batchingEnabled: true,
+      });
+      expect(producer).not.toBeNull();
+
+      const consumer = await client.subscribe({
+        topic,
+        subscription: 'sub1',
+        ackTimeoutMs: 10000,

Review comment:
       No, it isn't necessary. I'll remove it.
   




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



[GitHub] [pulsar-client-node] massakam commented on a change in pull request #137: Return MessageId as promise resolve at Producer#send

Posted by GitBox <gi...@apache.org>.
massakam commented on a change in pull request #137:
URL: https://github.com/apache/pulsar-client-node/pull/137#discussion_r548803734



##########
File path: tests/end_to_end.test.js
##########
@@ -665,5 +665,54 @@ const Pulsar = require('../index.js');
       await consumer.close();
       await client.close();
     });
+
+    test('Produce/Consume and validate MessageId', async () => {
+      const client = new Pulsar.Client({
+        serviceUrl: 'pulsar://localhost:6650',
+        operationTimeoutSeconds: 30,
+      });
+
+      const topic = 'persistent://public/default/produce-consume-message-id';
+      const producer = await client.createProducer({
+        topic,
+        sendTimeoutMs: 30000,
+        batchingEnabled: true,
+      });
+      expect(producer).not.toBeNull();
+
+      const consumer = await client.subscribe({
+        topic,
+        subscription: 'sub1',
+        ackTimeoutMs: 10000,

Review comment:
       Do we need to set `ackTimeoutMs`?




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