Skip to content

Akka.IO: remove the unimplemented ResumeWriting / WritingResumed / useResumeWriting API - #8660

Merged
Aaronontheweb merged 3 commits into
akkadotnet:devfrom
Aaronontheweb:fix/io-remove-resume-writing
Sep 29, 2026
Merged

Aaronontheweb merged 3 commits into
akkadotnet:devfrom
Aaronontheweb:fix/io-remove-resume-writing

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

What

Removes Akka.IO's NACK-style write-suspend/resume API, which was never implemented:

  • Tcp.ResumeWriting and Tcp.WritingResumed
  • the useResumeWriting parameter and UseResumeWriting property on Tcp.Register
  • the useResumeWriting parameter on TcpMessage.Register(...)
  • TcpMessage.ResumeWriting()

Why

JVM Akka's Register(useResumeWriting = true) makes the connection reject writes while one is pending, suspend later writes, and reply WritingResumed once it can accept writes again. Akka.NET copied the message shapes but never wired up the behavior: TcpConnection never read Register.UseResumeWriting, never suspended writes, and its ResumeWriting handler was a no-op ("No special action needed — transport handles write buffering"). Akka.NET already buffers writes and uses ack-based backpressure (Tcp.Write.Create(data, ack)) as the real flow-control mechanism, so this API only misled callers into thinking a NACK mode existed. Discussed in #8646 / #8617; removing it outright rather than deprecating it.

Changes

  • Deleted the dead types/members above from src/core/Akka/IO/Tcp.cs, and the no-op Receive<ResumeWriting> handler from src/core/Akka/IO/TcpConnection.cs.
  • Updated the two Tcp.Register(..., useResumeWriting: false) call sites in Akka.Streams's TcpStages.cs, plus a test helper and a stale commented-out line.
  • Updated the Akka.API.Tests approval baselines (CoreAPISpec.ApproveCore.DotNet.verified.txt / ...Net.verified.txt).
  • Added a row to BREAKING_CHANGES_V1.6.md.

Migration

Delete the useResumeWriting argument from any Register/TcpMessage.Register calls and any ResumeWriting sends. Use ack-based writes (Tcp.Write.Create(data, ack)) for backpressure.

…eResumeWriting API

Removes Tcp.ResumeWriting, Tcp.WritingResumed, the useResumeWriting
parameter and UseResumeWriting property on Tcp.Register, and the
useResumeWriting parameter on TcpMessage.Register /
TcpMessage.ResumeWriting(). This NACK-style write-suspend/resume mode
mirrors JVM Akka's message shapes but was never implemented in
Akka.NET: TcpConnection never read Register.UseResumeWriting, never
suspended writes, and ResumeWriting was a no-op handler.

Updates the two Akka.Streams callers, a streams test helper, a
commented-out test line, and the API approval baselines. Ack-based
writes (Tcp.Write.Create(data, ack)) remain the backpressure model.

Records the removal in BREAKING_CHANGES_V1.6.md.
@Aaronontheweb
Aaronontheweb merged commit 16359b5 into akkadotnet:dev Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant