Azure / Azure/azure-sdk-for-rust
Add a pluggable AMQP WebSocket connector
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 112
Description
## Summary
A public, object-safe WebSocket connector abstraction allows `azure_core_amqp` callers to supply WebSocket stream creation. The current `fe2o3-amqp-ws` connector remains the default.
## Motivation
PR #5031 directly constructs `fe2o3_amqp_ws::WebSocketStream` in `sdk/core/azure_core_amqp/src/fe2o3/connection.rs`. Unlike the HTTP transport, the AMQP WebSocket transport has no public replacement hook. Applications need an extension point for another WebSocket implementation without changing the transport-kind enum.
## Proposal
- The connector returns an erased asynchronous byte stream compatible with `AsyncRead`, `AsyncWrite`, `Debug`, `Send`, `Unpin`, and `'static`.
- `AmqpConnectionOptions`, the Event Hubs producer and consumer builders, and `RecoverableConnection` carry the connector through initial connections and reconnects.
- The built-in `fe2o3-amqp-ws` connector remains the default.
- A mock connector test covers the initial connection and recovery paths.
Found while reviewing #5031.
Contributor guide
Research direction
Start with sdk/core/azure_core_amqp/src/fe2o3/connection.rs, where the current fe2o3-amqp-ws WebSocketStream is constructed, then trace AmqpConnectionOptions, the Event Hubs producer and consumer builders, and RecoverableConnection. Verify how a mock connector can cover both initial connection and recovery paths; done means callers can supply an object-safe connector while the built-in connector remains the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100