Skip to content

Commit

Permalink
fixed OverflowStrategy in SupervisedStream to backpressure instead of…
Browse files Browse the repository at this point in the history
… failing

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle authored and Stanchev Aleksandar committed Apr 18, 2023
1 parent a0aba9a commit ba9b820
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface SupervisedStream {
* @return the source queue.
*/
static Source<SessionedJsonifiable, WithQueue> sourceQueue(final int queueSize) {
return Source.<SessionedJsonifiable>queue(queueSize, OverflowStrategy.fail().withLogLevel(Logging.WarningLevel()))
return Source.<SessionedJsonifiable>queue(queueSize, OverflowStrategy.backpressure().withLogLevel(Logging.WarningLevel()))
.viaMat(KillSwitches.single(), Keep.both())
.mapMaterializedValue(pair -> {
final SourceQueueWithComplete<SessionedJsonifiable> sourceQueue = pair.first();
Expand Down

0 comments on commit ba9b820

Please sign in to comment.