azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[QUERY] Move samples from track 1 SDK to track 2 SDK
Library name and version
Azure.Messaging.ServiceBus
Query/Question
There are a lot of samples for the track 1 SDK which are not available for the track 2 SDK. We should convert these, as it will help customers getting onboarded easier on the new SDK. Below an overview of all the samples, if they have an equivelant in the track 2 samples, and if not, my opinion on priority.
Environment
No response
Label prediction was below confidence level 0.6
for Model:ServiceLabels
: 'Service Bus:0.55421144,Storage:0.08609053,Azure.Identity:0.021247404'
TopicFilters was migrated already - https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters
As was DeadLetterQueue - https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue
Transactions Across Entities - https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample06_Transactions.md#transactions-across-entities
@EldertGrootenboer, we've gone through the samples listed and think they fall roughly into three buckets:
- A feature of the service that is exposed via the data-plane operations. The user has to do something with the data-plane types to use the feature.
- A feature of the service that can be configured with the admin client, but once configured, it will just work and the samples merely demonstrate that the feature is working.
- A general messaging pattern that is demonstrated with the library.
We think that all of the samples that fall into the first bucket belong in the samples and possibly README of the library in this repo. For the second bucket, it makes sense to have more extensive samples involving all of the configuration options via the admin client, but the actual samples that prove that the feature works would probably be better suited in the Azure-Samples repo along with other Azure samples. For the third bucket, we think these can go in the Azure-Samples repo as well. Please let us know if you have any thoughts or concerns with the plan!
Here is the breakdown:
Track 1 | Track 2 | Priority |
---|---|---|
TopicFilters | TopicFilters (possibly move to Azure-Samples) | 0 |
TransactionsAndSendVia | Transactions | 0 |
ReceiveLoop | Since this isn't the recommended usage, this could be treated as a more advanced pattern and live in the samples repo. | 1 |
RoleBasedAccessControl | Using Azure.Identity | 1 |
SendersReceiversWithTopics | We should add a version of Sending/Receiving using topics/subscriptions to this repo. | 1 |
TopicsGettingStarted | This would be the same as SendersReceiversWithTopics for T2, since we don't have the Topic/SubscriptionClients anymore | 1 |
AutoForward | This is a pattern that could be demonstrated in the samples repo | 2 |
DuplicateDetection | This is is essentially proving that the service feature works - it can live in the samples repo. | 2 |
GeoReplication | This is a pattern that could be demonstrated in the samples repo. | 2 |
PartitionedQueues | This demonstrates how partitioned queues work. It could be added to samples repo. | 2 |
Prefetch | This should be added as part of a configuration sample to the repo. | 2 |
QueuesRequestResponse | This is a messaging pattern that can be added to samples repo. | 2 |
TimeToLive | This could be added as part of one of the sender samples to this repo. | 2 |
DurableSender | Messaging pattern that can be demonstrated in samples repo. | 3 |
PrioritySubscriptions | Messaging pattern that can be demonstrated in samples repo. | 3 |
SessionState | Library feature that should be included in sample. | 3 |
DeadletterQueue | DeadLetterQueue (possibly move to Azure-Samples) | |
Deferral | Settling Messages | |
ManagingEntities | CRUD Operations | |
MessageBrowse | Sending and Receiving Messages | |
QueuesGettingStarted | Sending and Receiving Messages | |
ScheduledMessages | Sending and Receiving Messages | |
SendersReceiversWithQueues | Sending and Receiving Messages | |
Sessions | Sending and Receiving Session Messages |
Another sample that we should include in the repo - handling non-Data message bodies, i.e. AMQP Value/Sequence bodies.
SDK Scenarios
These samples should live somewhere in the language repo. Not all of these belong in the main README, but they should at least be covered in a sample.
- Constructing ServiceBusClient with the various auth forms - connection string, TokenCredential, NamedKeyCredential
- Sending and receiving from a queue
- Sending and receiving with a topic/subscription
- Settling messages
- Renewing message/session locks
- Scheduling messages
- Setting TimeToLive on a message
- Peeking messages
- Using sessions - accept next session, accept specific, set/get session state
- Using the Admin client
- Configuring prefetch
- Using the processor
All that is remaining is samples for NamedKeyCredential/SasCredential.