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/09/27 09:55:28 UTC

[GitHub] [pulsar-client-node] alanhoff opened a new pull request #126: Adds getProducerName and getTopic to Producer

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


   It simply hooks up `pulsar_producer_get_topic` and `pulsar_producer_get_producer_name` so the JS client can have access to these values.


----------------------------------------------------------------
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] hrsakai commented on a change in pull request #126: Adds getProducerName and getTopic to Producer

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



##########
File path: tests/producer.test.js
##########
@@ -56,6 +56,24 @@ const Pulsar = require('../index.js');
           batchingEnabled: true,
         })).rejects.toThrow('Failed to create producer: ConnectError');
       });
+
+      test('Producer Name', async () => {
+        const producer = await client.createProducer({
+          topic: 'persistent://public/default/topic',
+        });
+
+        expect(typeof producer.getProducerName()).toBe('string');

Review comment:
       @alanhoff 
   
   Thank you for your contribution.
   
   [nits]
   Could you set producerName and check that string?
   
   e.g.
   ```
           const producer = await client.createProducer({
             topic: 'persistent://public/default/topic',
             producerName: 'aaaaa'
           });
   
   expect(producer.getProducerName()).toBe('aaaaa');
   ```




----------------------------------------------------------------
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] alanhoff commented on a change in pull request #126: Adds getProducerName and getTopic to Producer

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



##########
File path: tests/producer.test.js
##########
@@ -56,6 +56,24 @@ const Pulsar = require('../index.js');
           batchingEnabled: true,
         })).rejects.toThrow('Failed to create producer: ConnectError');
       });
+
+      test('Producer Name', async () => {
+        const producer = await client.createProducer({
+          topic: 'persistent://public/default/topic',
+        });
+
+        expect(typeof producer.getProducerName()).toBe('string');

Review comment:
       Of course, no problem!




----------------------------------------------------------------
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] hrsakai merged pull request #126: Adds getProducerName and getTopic to Producer

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


   


----------------------------------------------------------------
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] alanhoff commented on a change in pull request #126: Adds getProducerName and getTopic to Producer

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



##########
File path: tests/producer.test.js
##########
@@ -56,6 +56,24 @@ const Pulsar = require('../index.js');
           batchingEnabled: true,
         })).rejects.toThrow('Failed to create producer: ConnectError');
       });
+
+      test('Producer Name', async () => {
+        const producer = await client.createProducer({
+          topic: 'persistent://public/default/topic',
+        });
+
+        expect(typeof producer.getProducerName()).toBe('string');

Review comment:
       Fixed




----------------------------------------------------------------
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