You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "shibd (via GitHub)" <gi...@apache.org> on 2026/01/28 11:41:59 UTC

[PR] Fix issue #3505: Set client description to identify Node.js client [pulsar-client-node]

shibd opened a new pull request, #453:
URL: https://github.com/apache/pulsar-client-node/pull/453

   ## Summary
   This PR fixes issue #3505 by adding a `description` parameter to the Node.js client configuration. The default description is set to `"node"`, which causes the client version in topic stats to display as `"Pulsar-CPP-vX.Y.Z-node"` instead of just `"Pulsar-CPP-vX.Y.Z"`.
   
   ## Problem
   The Node.js client wraps the C++ client library. When connecting to the broker, it uses the C++ client's version string, making it impossible to distinguish Node.js clients from C++ clients in topic statistics. This creates confusion for operators monitoring their Pulsar clusters.
   
   ## Solution
   - Added `description` parameter to `ClientConfig` interface
   - Set default description to `"node"` to identify the client as Node.js
   - Allow users to override the description if needed
   - Utilize the existing `setDescription()` method from the C++ `ClientConfiguration` class
   
   ## Changes
   - `src/Client.cc`: Add description configuration parsing and set default value
   - `index.d.ts`: Add `description?: string` to `ClientConfig` interface
   
   ## Testing
   After applying this fix, the `clientVersion` in topic stats will display as:
   - With default: `"Pulsar-CPP-v4.0.0-node"`
   - With custom description: `"Pulsar-CPP-v4.0.0-node-v1.0.0"` (if description is `"node-v1.0.0"`)
   
   ## Backward Compatibility
   This change is fully backward compatible. Existing code will continue to work, and the client version string in topic stats will simply include the additional `-node` suffix.
   
   ## Related Issues
   Fixes #3505


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix issue #3505: Set client description to identify Node.js client [pulsar-client-node]

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd closed pull request #453: Fix issue #3505: Set client description to identify Node.js client
URL: https://github.com/apache/pulsar-client-node/pull/453


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix issue #3505: Set client description to identify Node.js client [pulsar-client-node]

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd commented on PR #453:
URL: https://github.com/apache/pulsar-client-node/pull/453#issuecomment-3810843984

   Replacing with updated PR that correctly implements the fix - automatically setting client description without requiring user configuration.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org