-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix duplicate code snippet label and add connection string example in azure-messaging-eventhubs README #47173
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: samvaity <[email protected]>
| The snippet below creates a synchronous Event Hub producer. | ||
|
|
||
| ```java com.azure.messaging.eventhubs.eventhubproducerclient.construct | ||
| ```java |
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.
@copilot Add one com.azure.messaging.eventhubs.eventhubproducerclient.connectionstring example in EventHubsJavaDocCodeSamples and reference it here instead.
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.
Added the connection string example in EventHubsJavaDocCodeSamples.java with label com.azure.messaging.eventhubs.eventhubproducerclient.connectionstring and updated the README to reference it. The section now properly demonstrates creating a producer using a connection string as intended. (commit 41b006b)
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 updates the Event Hubs authentication documentation in the README to prioritize connection string-based authentication over token credential-based authentication. The main example under "Authenticate the client" is changed from using DefaultAzureCredential to using a connection string, and a new code sample method is added to support this documentation change.
- Changed the primary authentication example in README from
DefaultAzureCredentialto connection string - Added
createProducerWithConnectionString()method to EventHubsJavaDocCodeSamples.java - Updated README code snippet reference from
eventhubproducerclient.constructtoeventhubproducerclient.connectionstring
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| EventHubsJavaDocCodeSamples.java | Added new method demonstrating Event Hub producer creation using connection string |
| README.md | Changed the primary authentication example from DefaultAzureCredential to connection string |
|
Hi @copilot. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates. |
Hi @samvaity. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates.
|
Hi @copilot. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates. |
The label
com.azure.messaging.eventhubs.eventhubproducerclient.constructappeared twice in the README, causing validation failures. Additionally, the "Create an Event Hub producer using a connection string" section incorrectly showed credential-based authentication instead of a connection string example.Changes
createProducerWithConnectionString()inEventHubsJavaDocCodeSamples.javawith labelcom.azure.messaging.eventhubs.eventhubproducerclient.connectionstringThe connection string section now correctly shows connection string-based authentication, while the DefaultAzureCredential section shows credential-based authentication, ensuring each section accurately represents its intended authentication method.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.