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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
