Commit graph

232 commits

Author SHA1 Message Date
Patrik Nordwall
6f330ef69c automatic throttle burst size, #24699 (#24784)
* automatic throttle burst size, #24699

* throttleEven used maxBurst=Int.MaxValue, which in practise resulted
  in no throttling at all at high rates
* The original problem that throttleEven tried to solve was that when
  the throttle rate (cost / per) was high the cost of scheduling
  dominated and became much lower than the given rate, if 0 or low
  maxBurst was given. Difficult for user to know what maxBurst to use.
* In fact, that was already the case for rates > 30/s.
* This is fixed by automatically adjusting the maxBurst for higher
  throttle rates in a new throttle overload that doesn't include
  maxBurst parameter
* Also skipped the mode parameter for that variant since Shaping is
  what almost always is what you want, and otherwise you can use
  the full signature with a good maxBurst
* Deprecated throttleEven, since it is the same. Also fixed the
  implementation of throttleEven to use the automatic burst size,
  since Int.MaxValue is not useful at all.
2018-04-02 15:07:16 +01:00
mikolak-net
00068e2d1d Extrapolate stage and expand redoc #23804 2018-03-27 10:39:25 +02:00
kerr
e98c77e976 + str Add java.time.Duration to akka-stream's javadsl.* (#24706)
* + str Add java.time.Duration to javadsl.Source

* + str Add java.time.Duration to javadsl.Flow

* + str Add java.time.Duration to javadsl.BidiFlow

* + str Add java.time.Duration to javadsl.RestartSource,RestartFlow and RestartSink

* + str Add java.time.Duration to javadsl.StreamConverters

* + str Add java.time.Duration to javadsl.SubFlow

* + str Add java.time.Duration to javadsl.SubSource

* !stream Deprecate methods which previously accepts Scala's FiniteDuration.
2018-03-19 14:57:26 +09:00
Jimin Hsieh
2c2b8ba001 Remove some of Unused import warning (#24650) 2018-03-16 12:08:29 +01:00
Johan Andrén
d8b9bb1b3a
Java Flow dsl lower bounds incorrect #24368 2018-03-15 14:53:50 +01:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
Roman Filonenko
0ecadf7235 deduplicate logic for IODispatcher #24604 (#24619)
* deduplicate logic for IODispatcher #24604
 * introduce a resolveDispatcher helper in ActorAttributes
 * mention akka.stream.materializer.blocking-io-dispatcher instead of akka.stream.blocking-io-dispatcher in scaladocs
 * fix a flaky test
 * cosmetic changes in the touched files

* move resolveDispather helper to the Dispatcher companion object under a new name resolve

* filter out mima warning

* fix mima excludes after the 2.5.11 release

* address review comments
 * update stream-io.md with the correct dispatcher config key
 * mark ActorAttributes.Dispatcher#resolve as internal API
 * use the dispatche config key in ActorMaterializer

* add private[akka] to the resolve methods
2018-03-07 15:12:34 +01:00
Yan Su
519e6ae546 Add java duration support for Source.tick (Java DSL) #24339 (#24645) 2018-03-05 17:13:15 +01:00
Konrad Malawski
d6000df367 =str add simplified ask(ref) that defaults parallism 2 2018-02-22 19:50:46 +09:00
Konrad Malawski
4714f16dcf +str #18142 ask pattern integration for akka streams
progressed with cleanup, removing the same thread exec context is
weird... causes issues :-/ Need to debug more, could be that some race
also exists in mapAsync then :\

WIP

finish ask impl via watch stage

mima

consistency spec

fix paradox, and fix adding ask/watch to javadsl source

follow up review
2018-02-22 19:50:46 +09:00
Oleksii Tkachuk
80da4cadee Issue 24519: Created method lazilyAsync for both DSLs and adds section in docs (#24568)
* Issue 24519: Created method lazilyAsync for both DSLs and adds section in docs.

* Issue 24519: Changes according to code review

* Issue 24519: Added unit tests

* Update LazilyAsyncSpec.scala

* Issue 24519: Added copyright
2018-02-22 10:15:25 +09:00
Stefano Bonetti
3ea59b1e76 Adding preMaterialize operator for Source #23894 (#24497) 2018-02-21 15:06:01 +09:00
虎鸣
e44fafd4b7 + stream add collectType operator to Source,SubSource,Flow and SubFlow for javadsl.
add docs for collectType, do mirror it in scaladsl

mima
2018-02-21 14:23:11 +09:00
jeremystone
e766207a87 alsoTo eager cancellation #24291 2018-02-19 08:31:13 +01:00
Catalin Ursachi
ccf5d46a58 Add wireTap combinator (#15077) (#23824) 2018-02-13 20:39:00 +01:00
Patrik Nordwall
23fa8b0810 change spelling of behaviour to behavior, #24457 2018-02-01 15:10:46 +01:00
Viktor Klang (√)
08b0d34a4c Introduces eager cancellation for divertTo
* and updates Partition to support this behavior
* not adding Partition.apply overload due to type inference issues, use constructor instead
2018-01-30 19:59:53 +01:00
Viktor Klang (√)
e999d03e8b The most common partition-case, as divertTo(Mat) #24388 2018-01-22 19:17:41 +01:00
Konrad Malawski
6264f8ea70 +str #24229 back to Future[] API for stream refs
nitpicks
2018-01-23 02:27:10 +09:00
Konrad Malawski
c5a2785c7c +str #24229 implement flattening of mat values, may block; SHOULD BE INTERNAL API
add java documentation

images
2018-01-23 02:27:10 +09:00
Konrad `ktoso` Malawski
7c75abbf7e +str #24229 move SinkRef / SourceRef to akka.stream
+str #24229 remove protobuf changes, which do not need to be made in this PR

docs

moved things

config object

subscription timeout confifmed working, also, attributes

document attributes for sub timeout

tests for the source also failing when it should

additional demand test

implemented protection from materializing "in cycles"; would be nice in
types but that breaks the niceness of use of the types
SinkRef/SourceRef...

cleanup

no idle timeout built in, can use the Timeout stages

more docs

simplest change to prevent exposing SinkRef => SourceRef => SinkRef cycle

Things to decide:
 * is it ok to require using `getSource` / `getSink` as Java API, is there better naming?
 * where should the constructors go? I'd say just in regular javadsl/scaladsl `Source`/ `Sink` objects

move constructors to {javadsl,scaladsl}.{Source,Sink} companion objects

Remove now useless "canMaterialize" field

Separate stage (implementation) from ref (wrapped actor ref) to make it clearer what is serialized

Clarify that partner refs are not optional in on-the-wire interfaces

minor cleanup in SourceRefStage

Renamed the stages but questionable if that really helps ;)

cleanups, better docs

cleanup, fix docs compilation

fix mima

got rid of Futures in the materialized values of stream refs
2018-01-23 02:27:10 +09:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Johan Andrén
1751292580
Attributes on fromGraph(stage) should be treated as on stage #22911, #22523 2017-11-23 10:26:00 +01:00
Johan Andrén
6db974b6f4 No submaterializing inner source when outer stream already canceled (#23723)
* Do not try to submaterialize inner source when outer stream already cancelled #23656

* Use StreamDetachedException

* Sleep a little

* Updated exception text
2017-11-17 12:24:12 +01:00
Alexander Golubev
a7b1a6675b Add throttle combinator without bucket size in parameters (#23808)
* +str Add throttle combinator without bucket size in parameters

* Add mima filter plus comment formatting

* Reviwed throttle messages across all classes

* move mima filter to 2.4.6

* change to throttleEven, plus grammar fixes

* fix formatting

* changed mima filter according to new API

* fixes accoring to feedback
2017-11-17 12:20:12 +01:00
Richard Imaoka
a50df1c575 Add combinedMat method to Source (#23809)
* Add combinedMat method to Source

* Fix formatting
2017-11-02 10:34:40 +09:00
Johan Andrén
407131cb4e Stream supervision doc clarification #23376 2017-07-26 16:23:46 +02:00
James Roper
c60d20af32 Restart Flow/Source/Sink #19950 2017-07-20 15:02:34 +02:00
Patryk Najda
fe4c376a5e javadsl should use java types #23251 2017-07-03 13:39:00 +01:00
Richard Imaoka
4f10d45376 Correct the backpressure API comment for buffer 2017-06-28 00:07:19 +09:00
Richard Imaoka
c636f3540f Correct the backpressure API comment for throttle (Fixes #22791) (#23225) 2017-06-27 05:32:53 -07:00
Konrad `ktoso` Malawski
b7d7316c1c =str #22917 recoverWithRetries allow 0 and negative values 2017-06-13 11:18:46 +02:00
Hawstein
b3d00afdd1 Move ConstantFun to akka.util, #22813 2017-05-10 18:00:42 +02:00
Gilad Hoch
edee4ba409 +str #22711 adding GroupedWeightedWithin 2017-04-28 15:07:06 +02:00
Björn Antonsson
f8b4fb55ca Remove use of deprecated Scala features #22581 2017-03-27 19:05:54 +03:00
cchantep
5b542d99fa Flatten a Future[Graph[SourceShape[T], M]] as Source[T, Future[M]] #22359 2017-03-14 12:54:01 +01:00
Endre Sándor Varga
ba63c7af8d New materializer and layout 2017-03-01 16:18:55 +01:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
Konrad Malawski
e7e1f74427 =str more specific error type if idle-timeout triggers in tcp 2016-12-14 12:39:24 +01:00
Patrik Nordwall
c05bd51b68 format the code 2016-12-09 14:08:13 +01:00
Konrad `ktoso` Malawski
2ea8cd7410 =str deprecate ActorPublisher/Subscriber, use GraphStage (#21952)
* =str deprecate ActorPublisher/Subscriber, use GraphStage

* =str deprecate Source.actorPublisher / Sink.actorSubscriber

* =str added deprecation note of ActorPublisher,Subscriber
2016-12-08 17:22:01 +01:00
Konrad Malawski
04ab4ebb9c -str #21423 remove deprecated Stage references (#21919)
* -str #21423 remove deprecated Stage references

* include mima filters for removed classes
2016-12-02 14:23:13 +01:00
Patrik Nordwall
e04444567f Speedup pull request validation
* speedup ActorCreationPerfSpec
* reduce iterations in ConsistencySpec
* tag SupervisorHierarchySpec as LongRunningTest
* various small speedups and tagging in actor-tests
* speedup expectNoMsg in stream-tests
* tag FramingSpec, and reduce iterations
* speedup QueueSourceSpec
* tag some stream-tests
* reduce iterations in persistence.PerformanceSpec
* reduce iterations in some cluster perf tests
* tag RemoteWatcherSpec
* tag InterpreterStressSpec
* remove LongRunning from ClusterConsistentHashingRouterSpec
* sys property to disable multi-jvm tests in test
* actually disable multi-node tests in validatePullRequest
* doc sbt flags in CONTRIBUTING
2016-11-30 14:31:06 +01:00
Johan "Party Cannon" Andrén
267f31149c Lazy source (#21081) 2016-11-25 16:25:26 +01:00
Andrey Kuznetsov
3bd53c8bc2 fix SourceQueue docs inconsistencies #21852 2016-11-22 14:11:09 +01:00
kenji yoshida
aebfda540d =doc fix double 'the' in some docs (#21881) 2016-11-22 02:14:37 +01:00
Patrik Nordwall
aa8c253d14 improve streams actor integration docs, #21698 (#21700)
* mapAsync + ask should be the first choice
* add missing Source.queue
* prefer actorRefWithAck
* move ActorPublisher and ActorSubscriber to the end
  with additional warning
* fix wrong doc of SourceQueue offer
* and add missing java api
2016-10-26 10:24:51 +02:00
Mateus Dubiela Oliveira
c3abde60d5 Add scanAsync to Akka Streams, similar to scan but taking a Future (#21553)
* Add comprehensive tests
* Add documentation

* Damn comma after rebase

* Add documentation for foldAsync and scanAsync

* Rename aggreator and aggreating to current

* Remove out availability check

* Revert removing out and some refactors

* Formatting documentation

* Use after instead of Promise in test

* Use package reference to after and some refactoring
2016-10-17 16:43:11 +02:00
Stefano Bonetti
0f71b841b5 Include parallelism in mapAsyncUnordered docs #21556 2016-10-04 15:18:08 -05:00
Patrik Nordwall
d37fa8ec02 remove Range.Inclusive subclass (toString), #21548
* remove Range.Inclusive subclass (toString), #21548
* update java8-compat dependency for Scala 2.12-RC1
2016-09-27 13:21:49 +02:00