-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix confusing disableAutoComplete() examples in Service Bus documentation #47274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: samvaity <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes three documentation errors related to incorrect or misleading usage of disableAutoComplete() in Service Bus code examples. The changes remove duplicate method calls, eliminate inappropriate usage with RECEIVE_AND_DELETE mode (where messages are auto-settled by the broker), and correct a misleading comment in the dead-letter queue example that claimed disableAutoComplete() was being used when it wasn't called.
Key Changes:
- Removed duplicate
disableAutoComplete()calls in PEEK_LOCK mode examples across all documentation - Removed
disableAutoComplete()call and associated comment from RECEIVE_AND_DELETE mode examples (manual settlement not applicable in this mode) - Removed misleading comment about
disableAutoComplete()in dead-letter queue example where the method wasn't actually called
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ServiceBusReceiverClientJavaDocCodeSamples.java | Removed misleading comment claiming disableAutoComplete is used in dead-letter queue example |
| ServiceBusProcessorClientJavaDocCodeSamples.java | Removed duplicate disableAutoComplete() call in PEEK_LOCK example and removed call plus comment from RECEIVE_AND_DELETE example |
| package-info.java | Removed duplicate disableAutoComplete() call in PEEK_LOCK example |
| ServiceBusProcessorClient.java | Removed duplicate disableAutoComplete() call in PEEK_LOCK JavaDoc and removed call plus comment from RECEIVE_AND_DELETE JavaDoc |
| ServiceBusClientBuilder.java | Removed duplicate disableAutoComplete() calls in PEEK_LOCK JavaDoc examples and removed call plus comment from RECEIVE_AND_DELETE JavaDoc examples |
| README.md | Removed duplicate disableAutoComplete() call in PEEK_LOCK example and removed call plus comment from RECEIVE_AND_DELETE example, plus removed misleading comment in dead-letter queue example |
|
/azp run check-enforcer override |
|
Command 'check-enforcer' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
|
No pipelines are associated with this pull request. |
1 similar comment
|
No pipelines are associated with this pull request. |
|
/check-enforcer override |
Description
Fixes three documentation errors in Service Bus code examples where
disableAutoComplete()usage was incorrect or misleading:disableAutoComplete()call in builder chaindisableAutoComplete()call and comment (manual settlement is not applicable in RECEIVE_AND_DELETE mode)disableAutoCompleteis used when it wasn't calledBefore (PEEK_LOCK):
After:
Fixes documentation in README.md and corresponding JavaDoc code snippets across ServiceBusClientBuilder, ServiceBusProcessorClient, package-info, and sample classes.
Resolves https://github.com/MicrosoftDocs/azure-docs-sdk-java/issues/[issue_number]
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.