Azure / Azure/azure-sdk-for-rust

[Service Bus] Sender builds a new session and link for each call

Open
#4,947 0 comments 1 reaction 0 assignees View on GitHub
Client pillar-performance Service Bus
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
109

Description

## Summary

`Sender::schedule_message` creates an `AmqpSession`, begins it, attaches a sender link, sends, detaches, and ends the session, all inside one call. Other send paths repeat the pattern.

## Motivation

An attach and detach round trip per message adds latency to every send and gives the service no chance to reuse link credit. It also defeats the recoverable layer in #4940, because a link that only lives for one call can never be recovered.

Every attach uses the literal link name `sender-link`, so concurrent senders on one connection are not distinguishable in a service side trace.

## Proposal

- Attach the sender link once and hold it for the life of the `Sender`.
- Route sends, scheduled sends, and cancellations over the held link and the held management links.
- Give each link a unique name that includes the client identifier.

## Dependencies

Blocked by:

- #4940 [Service Bus] Add a recoverable connection and link layer

Sub-issue of #4934.

Contributor guide

Open the contributing guide

Research direction

Start with Sender::schedule_message and inspect the other send paths that create, attach, detach, and end sessions. Review the recoverable connection and link layer from #4940 before proceeding. Done means Sender holds reusable sender and management links, all send operations use them, and link names include the client identifier.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.