Commit graph

199 commits

Author SHA1 Message Date
Christopher Batey
09a97ce1c9 Document scanAsync (#28239)
* Document scanAsync

* Include async function in scanAsync example
2019-11-26 12:25:20 +01:00
Lim Chee Hau
444a86291e Add scanAsync examples to akka-docs (#25468) (#27990)
* Add scanAsync examples to akka-docs (#25468)

* Sync scan with scanAsync in akka-docs (#25468)
2019-11-26 10:57:12 +01:00
Lim Chee Hau
2ee63f5386 Add recover example to akka-docs (#25468) (#28004)
* Add recover example to akka-docs (#25468)

* Apply scalafmtAll (#25468)
2019-11-26 10:55:26 +01:00
Johan Andrén
ac15cb3289
Operator docs for Source.tick (#28225) 2019-11-25 13:25:07 +01:00
Christopher Batey
1b68951f86 =doc: take and takeWhile (#28078)
* Switch java examples to pass in actorsystem instead of materializer
2019-11-25 10:50:41 +01:00
Johan Andrén
d385c1098a
Operator docs for Source.combine (#28195) 2019-11-22 14:42:36 +01:00
Patrik Nordwall
6185fbde18 doc: Broadcast Stream operator, #25468 (#28091)
* doc: Broadcast Stream operator, #25468

* example intro text
2019-11-20 13:03:03 +01:00
Arnout Engelen
548b3589f2 doc: Flow.fold (#27850) 2019-11-18 18:02:44 +02:00
Johan Andrén
baf2dca686 Disable JavaUdpMulticastTest until we figure out why it fails 2019-11-18 09:10:23 +01:00
Thomas Braam
ab3f63899c Fixed small error in Akka Typed Getting Started Tutorial 5 (#28041) 2019-10-25 13:57:01 +02:00
Lim Chee Hau
3fb6e77fd2 Add grouped example to akka-docs (#25468) (#28013) 2019-10-18 08:51:31 +02:00
Johan Andrén
74adecb4e7
Align lazy and future operators #26446 2019-10-16 17:02:12 +02:00
Matthew Smedberg
3e71b8a8b8 Provide cancellation for CoordinatedShutdown tasks #27335 2019-10-15 13:01:13 +02:00
Patrik Nordwall
78281ba92f
doc: improvements to Distributed Data docs (#27971)
* doc: improvements to Distributed Data docs

* leftover

* java formatting
2019-10-14 14:03:04 +02:00
Johan Andrén
7102c4744d
Add a sample for Source.unfoldResource #25468 2019-10-05 12:28:07 +02:00
Patrik Nordwall
1a8a438144
doc: Source.maybe, #25468 (#27832) 2019-10-03 14:09:45 +02:00
Patrik Nordwall
91db18b564 ActorContext as constructor parameter in AbstractBehavior, #27689 (#27806)
* ActorContext as constructor parameter in AbstractBehavior, #27689

* additional test

* additional doc clarification

* another rebase
2019-09-27 11:17:37 +02:00
Johan Andrén
0719de035b
General concepts docs ported to typed (#27765) 2019-09-27 09:50:34 +02:00
Patrik Nordwall
1a90e715f5
Cleanup persistence docs, #24717 (#27779) 2019-09-26 22:48:12 +02:00
Patrik Nordwall
d4d44a4813
Merge pull request #27762 from akka/wip-24717-doc-ser-patriknw
doc: Cleanup serialization.md, #24717
2019-09-26 12:01:22 +02:00
Patrik Nordwall
b94f3c3bcc
Merge pull request #27707 from akka/wip-26187-finally-patriknw
Final removal of ActorPublisher and ActorSubscriber, #26187
2019-09-24 13:31:25 +02:00
Patrik Nordwall
f18d8af484 doc: Cleanup serialization.md, #24717 2019-09-19 17:53:02 +02:00
Patrik Nordwall
4e705f1d18
doc: stylish dispatchers.md, #24717 (#27748) 2019-09-19 16:32:37 +02:00
Patrik Nordwall
db132cd216 Final removal of ActorPublisher and ActorSubscriber, #26187
* some messages from ActorSubscriber were also used in other places,
  so moved those to impl.ActorSubscriberMessage
* WatermarkRequestStrategy used by SourceRefImp, so moved there
2019-09-19 13:21:52 +02:00
Patrik Nordwall
d8c8121c4d
Code example for collect and collectType (#27744)
Co-Authored-By: Helena Edelson <helena@users.noreply.github.com>
2019-09-19 11:22:37 +02:00
Jakob Merljak
4576835cce Akka Stream log operator documentation fix (#27654)
* Fix Akka Stream log operator documentation example

* Keep Scala documentation example in sync
2019-09-10 13:24:24 +02:00
Nicolas Vollmar
751918e84c Deprecates status message based api #27503 (#27519)
* Deprecates status message based api #27503
* Deprecates actorRefWithAck for actorRefWithBackpressure
2019-09-10 11:59:19 +02:00
tanaka takaya
9aa0e593b0 Bump up dependencies. (#27586)
* Bump up dependencies.

* revert sslConfigVersion and sigarLoader.

* only used in tests.

* Bump up dependencies.
2019-09-09 14:54:09 +02:00
Patrik Nordwall
0783855b2c
Merge pull request #27552 from akka/wip-26537-slf4j-patriknw
Typed logging with slf4j, #26537
2019-09-06 11:33:56 +02:00
Patrik Nordwall
68424b4f55 Complete logging with SLF4J in Typed, #26537
* TestAppender interaction with LoggingEventFilter
  * TestAppender plays the same role as classic TestEventList
* replace Sl4jLoggingEvent.java
  * include MDC in testkit.LoggingEvent to allow for custom filter
    testing MDC
* fix tests
* fix log events in BehaviorSetKit, using SubstituteLogger
* MDC in EventSourcedBehavior
  * using raw MDC to set the persistenceId and persistencePhase fields
  * avoid access to MDC ThreadLocal if log isn't used

* Automatically enable eventStream Slf4jLogger for Typed (PR #27583)
  * amend the ActorSystem config on startup when config akka.use-slf4j=on
    and akka-slf4j in classpath
  * akka.use-slf4j is defined in akka-actor-typed reference.conf
  * also enable the Slf4jLoggingFilter automatically
  * remove config in tests

* Include actor path as akkaSource in MDC (PR #27587)
  * move logger init to ActorContextImpl since not specific to untyped (ActorContextAdapter)
  * careful to not access MDC ThreadLocal if logging isn't used (per message)
  * MDC is cleared (if used) from aroundReceive in ActorAdapter after processing each message
  * also changed MDC for EventSourcedBehavior to rely on context.log and the outer MDC.clear()
  * just removing the MDC values is not enough because the empty Map remains in the ThreadLocal

* Optimization of MDC interceptor (PR #27610)

* Extension methods to Logger as workaround for overload and varargs problem (PR #27605)
  * "ambiguous reference to overloaded definition" for 2 arg method
  * varargs not supported for primitive types
  * providing extension methods info2 and infoN (and friends) via implicit class LoggerOps
    as more convenient workaround for these problems

* New API for Typed LoggingEventFilter (PR #27611)
  * builder style
  * will make it easier to add more conditions
  * all conditions are AND:ed together which makes it easier to define custom filters
  * simplifies the implementation as a bonus
  * javadsl
  * use new api in all tests
  * leeway setting
  * verify that occurrences = 0 works
  * use javadsl in two tests
  * change interceptLogger, and some other feedback

* Testing utility to silence logging until failure (PR #27588)
  * Logback appender that captures all log events and can flush them
    later to other appenders
  * LogCapturing mixin for ScalaTest that flush the captured logging events
    when a test fails. Also clears the captured events after all tests.
  * Configuration in logback-test.xml
  * log capturing for JUnit tests too, using TestRule
  * Silence initial setup logging from Logback
  * make LogCapturing public
  * use LogCapturing in all tests
    * aside from multi-jvm, and a few extending AkkaSpec, so far
  * a few doc tests needed debug level

* mention in migration guide
* rename setLoggerClass to setLoggerName
* check for logback dependency to give nicer error message
* fix filterKeys, deprecated in 2.13
2019-09-06 10:09:54 +02:00
Patrik Nordwall
e80b591115 rename the new Materializer.create to createMaterializer, #27642
* because static methods are resolved by looking at extended class too,
  and that results in ambigious method clash with existing create in
  ActorMaterializer
2019-09-06 09:02:22 +02:00
Johan Andrén
b68d67008a
Deprecate actor materializer (#27538) 2019-09-05 16:08:37 +02:00
Helena Edelson
29f2eba049 Change "Untyped" to "Classic" (#27627)
* Untyped to classic naming convention #24717
* Added entry of naming convention change to migration docs.
* Rename `toUntyped` to `toClassic` in adapters
2019-09-05 12:30:52 +02:00
Johan Andrén
aca63ea198
Materializer settings as attributes (#27499)
* Replace MaterializerSettings with Attributes #25559 
 * Field access to settings deprecated to make stages use attributes instead
 * Internal stages updated to use attributes
 * Docs on ActorMaterializerSettings updated to recommend away from using it
 * Verify all stages stopped after each testcase in FlowGroupBySpec
 * Subscription timeout attributes merged into one
2019-09-04 13:37:06 +02:00
Patrik Nordwall
b2bef35f0c
doc: stylish getting started tutuorial, #24717 (#27596)
* Move messages from DeviceProtocol to Device (in .java)
* rename Message to Command
* rename createBehavior to create
* rename message handle methods to onX
* private constructor
* get rid of DeviceManagerProtocol too
* rename Message to Command
2019-09-03 13:07:21 +02:00
Arnout Engelen
29b95f166a Improve Java perspective dispatcher docs (#27521) 2019-08-29 14:22:49 +02:00
Patrik Nordwall
bc2caf866c remove unused sample for classic getting started guide
* guide was removed previously
2019-08-28 14:01:47 +02:00
Johan Andrén
45c826a218
System wide materializer (#27491)
Introduces a materializer started through an extension and then an implicit
conversion for Scala turning an implicitly available ActorSystem into a
materializer. The Java APIs has been ammended with run-methods accepting
an ActorSystem.
2019-08-23 18:19:27 +02:00
Arnout Engelen
34f9faf5fa
Convert 'Blocking needs Careful Management' from classic (#27498)
* Convert 'Blocking needs Careful Management' from classic

* Move triggering blocking calls to separate methods

* Remove classic examples of dispatching
2019-08-16 17:35:52 +02:00
Christopher Batey
6c13949aec Use protobuf3 for internal serialization (#27366)
* Only load akka protobuf serializer if protobuf on the classpath
2019-08-15 17:43:19 +02:00
James Roper
511356177d Added actor termination coordinated shutdown task #27089
A convenience method that allows creating a
shutdown task by sending a message to an actor, and watching for its
termination.
2019-07-16 10:56:48 +02:00
Patrik Nordwall
3efc1c2877
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
  from akka-remote to akka-actor since they had no dependency
  and are useful also in local systems, e.g. persistence.
  * e.g. needed for persistence-tck
  * less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
  but misconfigured
* Made tests pass
  * allow-java-serialization=on in akka-persistence
  * allow-java-serialization=on in classic remoting tests
  * JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
  * Boolean
  * java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
  * Effect() is factory in EventSourcedBehavior  class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
  * fallback to akka.remote.serialization.ThrowableNotSerializableException
    if exception is not serializable when wrapped in system messages from
    remote deployed child actors and Status.Failure messages
  * it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
  improving or removing that feature
* migration guide, including description of rolling update

* fix 2.13 compiler error

* minor review feedback
2019-07-11 14:04:24 +02:00
Stefan Ganzer
e59819a4cd ActorHierarchyExperiments: Send a start message to the first actor (#27204)
* Send a `start` message to the first actor

Otherwise, only the actor system is started, but none of the actors.

* Send a `start` message to the first actor

Otherwise, only the actor system is started, but none of the actors.
2019-06-27 16:17:36 +01:00
Patrik Nordwall
10d32fceb9 scheduleWithFixedDelay vs scheduleAtFixedRate, #26910
* previous `schedule` method is trying to maintain a fixed average frequency
  over time, but that can result in undesired bursts of scheduled tasks after a long
  GC or if the JVM process has been suspended, same with all other periodic
  scheduled message sending via various Timer APIs
* most of the time "fixed delay" is more desirable
* we can't just change because it's too big behavioral change and some might
  depend on previous behavior
* deprecate the old `schedule` and introduce new `scheduleWithFixedDelay`
  and `scheduleAtFixedRate`, when fixing the deprecation warning users should
  make a concious decision of which behavior to use (scheduleWithFixedDelay in
  most cases)

* Streams
* SchedulerSpec
  * test both fixed delay and fixed rate
* TimerSpec
* FSM and PersistentFSM
* mima
* runnable as second parameter list, also in typed.Scheduler
* IllegalStateException vs SchedulerException
* deprecated annotations
* api and reference docs, all places
* migration guide
2019-06-05 11:38:04 +02:00
Christopher Batey
e7672a9802
Remove various features deprecated since 2.5.0 (#27023)
* Remove various features deprecated since 2.5.0
2019-05-29 07:10:40 +01:00
Arnout Engelen
814cfa286c Scala 2.13.0 rc2 (#26967) 2019-05-24 08:11:50 +02:00
Patrik Nordwall
24a3bba135
Add reason for deprecating TypedActor, #25516 (#26993)
* Add reason for deprecating TypedActor, #25516

Co-Authored-By: Helena Edelson <helena@users.noreply.github.com>
2019-05-24 08:07:58 +02:00
Nicolas Vollmar
f37f41574d Implements actorRef source variant with backpressure #17610 (#26633)
* Implements actorRef source variant with backpressure #17610

* Small improvements to documentation and source #17610

* Small improvements to test #17610

* Small improvements to implementation and tests #17610

* Adds API for akka-typed #17610

* Adds ack sender and java api for typed #17610
2019-05-20 12:19:44 +02:00
Patrik Nordwall
a2658cc8a0
Merge pull request #26933 from akka/wip-ClusterSingletonProxySpec-patriknw
more classic remoting leftovers
2019-05-17 11:07:29 +02:00
Arnout Engelen
7b20b89ce0
Add ByteString.emptyByteString to Java API (#26931)
* Add ByteString.emptyByteString to Java API

To work around https://github.com/scala/bug/issues/11509

* Add note to 2.6 migration document
2019-05-16 14:02:49 +02:00