You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/06/19 17:54:58 UTC

[PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

He-Pin opened a new pull request, #3095:
URL: https://github.com/apache/pekko/pull/3095

   ### Motivation
   
   The `Source.queue(bufferSize, overflowStrategy)` overloads (both Scala and Java DSLs) materialize a `SourceQueueWithComplete` whose asynchronous `offer` future can hang indefinitely under `OverflowStrategy.backpressure` when the buffer is full and downstream stalls. This is a long-standing trap that has caused real-world deadlocks (the same class of issue was documented upstream as akka/akka-core#29557, and more recently prompted akka/akka.net#8248 to add a cancellation-aware offer overload).
   
   Pekko already provides a safer replacement:
   
   - `Source.queue[T](bufferSize)` materializes a `BoundedSourceQueue` with synchronous feedback (drops the newest element when the buffer is full, never hangs).
   - For backpressure scenarios, `Source.actorRefWithBackpressure` and `MergeHub.source` cover the common use cases.
   
   The upstream Akka discussion in akka/akka-core#29801 ("Replace old Source.queue") has been open since 2021 without converging on a new backpressure primitive. We should not wait: the drop-new path (`BoundedSourceQueue`) is already stable and production-proven, and the backpressure path is covered by existing operators.
   
   ### Modification
   
   1. **API deprecation**: `@deprecated(since = "2.0.0")` on the four `Source.queue` overloads that accept an `OverflowStrategy` (two scaladsl + two javadsl). `Source.queue[T](bufferSize)` overloads that return `BoundedSourceQueue` are **not** deprecated. `SourceQueue` / `SourceQueueWithComplete` traits are not deprecated (they are still referenced by the deprecated factory return types and by user code).
   
   2. **Internal suppression**: `@nowarn("msg=deprecated")` on the deprecated factories (so their delegation chain does not retrigger the warning under `-Xfatal-warnings` / `-Werror`) and on the two Pekko-internal call sites that intentionally exercise the deprecated API: `InvokeWithFeedbackBenchmark` and `QueueSourceSpec`.
   
   3. **Docs**: rewrite `docs/.../Source/queue.md` to lead with the non-deprecated `BoundedSourceQueue` path, add a `@@@ warning` callout flagging the deprecated overloads, and add a migration table mapping each `OverflowStrategy` to its replacement. Update the Scala `#source-queue` snippet in `IntegrationDocSpec.scala` to match the Java counterpart (both now use `BoundedSourceQueue` with a direct `match`/`switch` on `QueueOfferResult`). Drop "or SourceQueue" from the one-line summary in `operators/index.md`.
   
   ### Result
   
   - Users calling `Source.queue(...)` with an `OverflowStrategy` get a compile-time deprecation warning pointing them to `Source.queue(bufferSize)` for drop-new, or `Source.actorRefWithBackpressure` / `MergeHub.source` for backpressure.
   - The hang trap is closed at the API level without breaking binary compatibility (the deprecated methods are unchanged, only annotated).
   - Pekko internal code is free of deprecation warnings under `-Xfatal-warnings`.
   - Docs page now steers readers toward the recommended path and documents an explicit migration for every overflow strategy.
   
   ### Tests
   
   - `sbt "stream / compile"` — pass (213 Scala + 5 Java sources)
   - `sbt "stream-tests / Test / compile"` — pass (229 Scala + 32 Java sources)
   - `sbt "bench-jmh / compile"` — pass (98 Scala + 1 Java sources)
   - `sbt "docs / Test / compile"` — pass (224 Scala + 234 Java sources; updated `#source-queue` snippet type-checks against `BoundedSourceQueue.offer` returning `QueueOfferResult`)
   
   ### References
   
   - Fixes apache/pekko#3094
   - Refs akka/akka-core#29801 (Replace old Source.queue — OPEN, stale since 2021)
   - Refs akka/akka-core#29557 (Async callback tracking OOM in Source.queue)
   - Refs akka/akka.net#8248 (Akka.NET cancellation-aware Source.Queue offer, motivating the same review)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3444227386


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   Since these messages all end up in the mailbox, if the system is under heavy load, the backpressure mechanism fails; you then see heap memory steadily rising, followed by Full GCs, and eventually the system crashes. I think it’s better to just remove it—how should I put it? The feature works fine under low load, but it’s riddled with bugs under high load. https://github.com/akkadotnet/akka.net/pull/8248 @Aaronontheweb FYI



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3444264957


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   there are other overflow stategies - should we consider doing something about OverflowStrategy .backpressure? We've already deprecated and removed OverflowStrategy.dropNew.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "Aaronontheweb (via GitHub)" <gi...@apache.org>.
Aaronontheweb commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3469718281


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   Yeah these days we have `Source.Channel` which uses a .NET System.Threading.Channel, which has bounded write / multi or single reader / writer semantics built in. I modified the queue here to accept a cancellation token mostly to bring it in line with .NET idioms for async programming.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3444297951


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   It’s futile, because messages must first enter the mailbox before policies can actually be executed; if the actor never gets scheduled, none of those policies take effect. Consequently, an Out-of-Memory (OOM) error occurs as the mailbox grows indefinitely. In my view, this design is fundamentally flawed—it poses serious production safety risks under high load and, quite simply, is prone to causing production incidents.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #3095:
URL: https://github.com/apache/pekko/pull/3095#issuecomment-4754108866

   doc build broken
   
   ```
   [06-19 18:58:19.145] [error] Class not found for @apidoc[Source.actorRefWithBackpressure] (pattern Source\$actorRefWithBackpressure$) at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/actor-interop.md:133
   [06-19 18:58:19.145] [error] The `Source.queue(Int, OverflowStrategy)` overloads that this section describes — including `OverflowStrategy.backpressure` — are **deprecated** because their asynchronous `offer` @scala[`Future`]@java[`CompletionStage`] can hang indefinitely when downstream stalls. Use `Source.queue[T](bufferSize)` (materializes a @apidoc[BoundedSourceQueue] with synchronous feedback), or for backpressure towards the producer use @apidoc[Source.actorRefWithBackpressure] or @apidoc[MergeHub.source$]. See @ref:[the Source.queue operator page](operators/Source/queue.md) for a per-strategy migration table.
   [06-19 18:58:19.146] [error]                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
   [06-19 18:58:19.146] [error] Class not found for @apidoc[MergeHub.source$] (pattern MergeHub\$source$) at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/actor-interop.md:133
   [06-19 18:58:19.146] [error] The `Source.queue(Int, OverflowStrategy)` overloads that this section describes — including `OverflowStrategy.backpressure` — are **deprecated** because their asynchronous `offer` @scala[`Future`]@java[`CompletionStage`] can hang indefinitely when downstream stalls. Use `Source.queue[T](bufferSize)` (materializes a @apidoc[BoundedSourceQueue] with synchronous feedback), or for backpressure towards the producer use @apidoc[Source.actorRefWithBackpressure] or @apidoc[MergeHub.source$]. See @ref:[the Source.queue operator page](operators/Source/queue.md) for a per-strategy migration table.
   [06-19 18:58:19.146] [error]                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^
   [06-19 18:58:19.146] [error] No matches found for apidoc query [and materialize a @apidoc[SourceQueueWithComplete]] at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/operators/Source/queue.md:9
   [06-19 18:58:19.147] [error] The `Source.queue` overloads that accept an @apidoc[OverflowStrategy] (and materialize a @apidoc[SourceQueueWithComplete]) are **deprecated**. Their asynchronous `offer` @scala[`Future`]@java[`CompletionStage`] can hang indefinitely under `OverflowStrategy.backpressure` when downstream stalls, which has caused real-world deadlocks.
   [06-19 18:58:19.147] [error]                                             ^
   [06-19 18:58:19.147] [error] No matches found for apidoc query [single imperative producer] at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/operators/Source/queue.md:11
   [06-19 18:58:19.147] [error] Prefer `Source.queue[T](bufferSize)` (this page), which materializes a @apidoc[BoundedSourceQueue] with synchronous feedback and drop-newest overflow. For backpressure towards the producer, use @apidoc[Source.actorRefWithBackpressure] (single imperative producer) or @apidoc[MergeHub.source$] (multiple producers). See the [migration table](#migrating-from-the-deprecated-sourcequeueint-overflowstrategy-overloads) below for a per-strategy replacement.
   [06-19 18:58:19.147] [error]                                                                                                                                                                                                   ^
   [06-19 18:58:19.147] [error] No matches found for apidoc query [multiple producers] at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/operators/Source/queue.md:11
   [06-19 18:58:19.147] [error] Prefer `Source.queue[T](bufferSize)` (this page), which materializes a @apidoc[BoundedSourceQueue] with synchronous feedback and drop-newest overflow. For backpressure towards the producer, use @apidoc[Source.actorRefWithBackpressure] (single imperative producer) or @apidoc[MergeHub.source$] (multiple producers). See the [migration table](#migrating-from-the-deprecated-sourcequeueint-overflowstrategy-overloads) below for a per-strategy replacement.
   [06-19 18:58:19.147] [error]                                                                                                                                                                                                                                                                            ^
   [06-19 18:58:19.147] [error] Class not found for @apidoc[BoundedSourceQueue.fail] (pattern BoundedSourceQueue\$fail$) at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/operators/Source/queue.md:94
   [06-19 18:58:19.147] [error] | `Source.queue(n, OverflowStrategy.fail)` | `Source.queue[T](n)` and, on `QueueOfferResult.Dropped`, call @apidoc[BoundedSourceQueue.fail] with a `BufferOverflowException`. |
   [06-19 18:58:19.147] [error]                                                                                                            ^
   [06-19 18:58:19.147] [error] No matches found for apidoc query [single imperative producer] at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/operators/Source/queue.md:95
   [06-19 18:58:19.147] [error] | `Source.queue(n, OverflowStrategy.backpressure)` | @apidoc[Source.actorRefWithBackpressure] (single imperative producer) or @apidoc[MergeHub.source$] (multiple producers). |
   [06-19 18:58:19.147] [error]                                                      ^
   [06-19 18:58:19.147] [error] No matches found for apidoc query [multiple producers] at /home/runner/work/pekko/pekko/docs/src/main/paradox/stream/operators/Source/queue.md:95
   [06-19 18:58:19.147] [error] | `Source.queue(n, OverflowStrategy.backpressure)` | @apidoc[Source.actorRefWithBackpressure] (single imperative producer) or @apidoc[MergeHub.source$] (multiple producers). |
   [06-19 18:58:19.147] [error]                                                                                                                               ^
   [06-19 18:58:19.147] [error] Paradox failed with 8 errors
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3444255082


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   What I mean is, since this has indeed caused problems in my experience, we could deprecate it first and then remove it after a few years once hardly anyone is using it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #3095:
URL: https://github.com/apache/pekko/pull/3095#issuecomment-4967231860

   Verified locally: `sbt "docs/paradox"` completed successfully (exit code 0) on commit `e66a0966e6` — no apidoc errors, only pre-existing duplicate-anchor warnings in release notes.
   
   The 8 Paradox errors from the earlier commit (`44e3d67c`) are fully resolved. Ready for re-review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #3095:
URL: https://github.com/apache/pekko/pull/3095


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3444214067


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   I'm not 100% sure but will go with the consensus.
   
   Could we consider not deprecating and just being more persuasive in the docs?
   
   I've already run into issues with the methods that we removed already in 2.0.0 and it being far from obvious what the replacement is. For me, if it's not broken, why remove it?
   Having alternatives is great.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3444220368


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   it will cause OOM and FGC at $Work, the real bug, trust me ,I was using it  and later migrate to the BoundedSourceQueue one by @jrudolph , the now it works very well, my system is the Taobao Live.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #3095:
URL: https://github.com/apache/pekko/pull/3095#discussion_r3469770909


##########
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:
##########
@@ -692,6 +692,12 @@ object Source {
    * @param bufferSize size of buffer in element count
    * @param overflowStrategy Strategy that is used when incoming elements cannot fit inside the buffer
    */
+  @deprecated(
+    "Prefer Source.queue(bufferSize) which materializes a BoundedSourceQueue with synchronous feedback " +
+    "(dropping the newest element when the buffer is full). For backpressure, use Source.actorRefWithBackpressure " +
+    "or MergeHub.source instead. See the Pekko Streams documentation for the Source.queue migration guide.",

Review Comment:
   Wow, nice! Thanks for the comment. I maintain a Taobao livestreaming system; initially, I used RxJava, but I frequently ran into OOM (Out of Memory) and FGC (Full Garbage Collection) issues during broadcasts by top streamers. Later, I switched to Akka Streams' `Source.queue`, but I still encountered FGC problems. This had a huge impact on the streams of individual top broadcasters, and the issue wasn't resolved until I finally switched to `BoundedSourceQueue`. The system is running very smoothly now. thanks @jrudolph 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] stream: deprecate Source.queue overloads that materialize SourceQueueWithComplete [pekko]

Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #3095:
URL: https://github.com/apache/pekko/pull/3095#issuecomment-4967212519

   The Paradox apidoc errors you reported on the earlier commit (`44e3d67c`) have been fixed in the current commit (`e66a0966e6`):
   
   - `@apidoc[Source.actorRefWithBackpressure]` → replaced with `@ref` link to `actorRefWithBackpressure.md`
   - `@apidoc[MergeHub.source$]` → replaced with plain text `MergeHub.source`
   - `@apidoc[SourceQueueWithComplete]` → replaced with backtick-quoted text
   - `@apidoc[single imperative producer]` / `@apidoc[multiple producers]` → replaced with plain text
   - `@apidoc[BoundedSourceQueue.fail]` → replaced with backtick-quoted text
   
   All remaining `@apidoc` references use valid class names (`OverflowStrategy`, `BoundedSourceQueue`, `GraphStage`) or have explicit anchors (`Source$`).
   
   Could you re-review when you get a chance? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org