Azure / Azure/azure-sdk-for-rust
[Service Bus] Remove dead code and add an AMQP constants module
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 109
Description
## Summary
The crate carries dead code, and the AMQP operation names, annotation keys, and property keys are written as string literals at their use sites.
## Motivation
Two open items on #2293 record this. Literal operation names are how `com.microsoft:defer-message` entered the crate and stayed there, because nothing collects the names in one place where a reader can compare them against the documented set.
`azure-sdk-for-net` keeps them in `ManagementConstants.cs` and `AmqpMessageConstants.cs`.
## Proposal
- Add a constants module holding the operation names, the annotation keys, and the property keys.
- Replace the string literals at their use sites.
- Remove the dead code the review identified.
Sub-issue of #4934.
Contributor guide
Research direction
Start by comparing the AMQP constants organization in azure-sdk-for-net's ManagementConstants.cs and AmqpMessageConstants.cs, then locate the Rust crate's operation-name, annotation-key, and property-key string literals and the dead code identified in the review. Done means a constants module holds the documented names, all use sites reference it, and the identified dead code is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, distributed-systems
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100