Skip to content

Commit

Permalink
pekko 1.0.2
Browse files Browse the repository at this point in the history
Fix deprecation warning with statefulMapConcat.
  • Loading branch information
brharrington committed Dec 6, 2023
1 parent 6e60aeb commit 4bd98dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,11 @@ class SubscribeApi(
.via(new WebSocketSessionManager(streamMeta, register, subscribe))
.flatMapMerge(Int.MaxValue, msg => msg)
.groupedWithin(batchSize, 1.second)
.statefulMapConcat { () =>
// Re-use the stream to reduce allocations
val baos = new ByteArrayOutputStream()

{ seq =>
List(BinaryMessage(LwcMessages.encodeBatch(seq, baos)))
}
}
.statefulMap(() => new ByteArrayOutputStream())(
(baos, seq) => baos -> List(BinaryMessage(LwcMessages.encodeBatch(seq, baos))),
_ => None
)
.mapConcat(identity)
.watchTermination() { (_, f) =>
f.onComplete {
case Success(_) =>
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import sbt._

object Dependencies {
object Versions {
val pekko = "1.0.1"
val pekko = "1.0.2"
val pekkoHttpV = "1.0.0"
val iep = "5.0.15"
val jackson = "2.16.0"
Expand Down

0 comments on commit 4bd98dc

Please sign in to comment.