gnodet commented on PR #31341:
URL: https://github.com/apache/camel/pull/31341#issuecomment-7408480618
## Additional Review Comments
_Claude Code on behalf of Guillaume Nodet_
### Positive Points ✅
1. **Client Lifecycle Management**: The `PulsarEndpoint.doStop()`
implementation is correct and defensive. It properly tracks whether the
endpoint created the client via the `pulsarClientCreated` flag and cleans up
appropriately.
2. **Comprehensive Tests**: The test coverage is excellent:
- `PulsarProducerOptionsTest` properly uses the real Pulsar client
builder to validate configuration
- `PulsarEndpointClientLifecycleTest` thoroughly tests all client
lifecycle scenarios
- `CommonCreationStrategyImplTest` validates the STICKY rejection
3. **Security Improvement**: Marking `authenticationParams` with `secret =
true` is a good security practice.
4. **Documentation**: The upgrade guide clearly explains all breaking
changes.
### Minor Suggestions 📝
1. **PulsarConfiguration.java:172-177** - The `keySharedPolicy` description
still mentions STICKY behavior but it's no longer in the enum. Consider
removing the STICKY description to avoid confusion.
2. **CommonCreationStrategyImpl.java:91** - The error message could be
slightly more helpful by explicitly stating what is supported. The current
message is good but could add clarity.
3. **Deprecation Note Format** - The `@Metadata` deprecation note on
`maxPendingMessagesAcrossPartitions` looks correct but verify the formatting is
properly handled by the code generator.
### Code Quality Assessment
- ✅ **Correctness**: All fixes correctly address the stated problems
- ✅ **Thread Safety**: Proper use of locks in PulsarProducer
- ✅ **Resource Management**: Client cleanup follows the "who creates it,
closes it" pattern
- ✅ **Backward Compatibility**: Breaking changes are documented in upgrade
guide
- ✅ **Test Coverage**: All changes have corresponding tests
The PR is well-implemented and ready to merge after addressing the minor
documentation suggestions above.
--
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]