New to Akka? Start with the Akka SDK.
Migration Guide 2.10.x to 2.11.x
Jackson 2.21
Akka Serialization Jackson now depends on the Jackson 2.21 long-term-support line. Akka 2.10 used Jackson 2.18 which will not get further updates past January 2027.
Removed deprecated APIs
APIs deprecated in Akka 2.10.0 or earlier have been removed. The sections below list the removed APIs and their replacements.
akka-actor-testkit-typed
LoggingTestKit.intercept(scaladsl): useexpectinstead.
akka-actor-typed
akka.actor.typed.scaladsl.LoggerOps: not needed in Scala 2.13 and later, use theorg.slf4j.Loggermethods directly.TimerScheduler.startPeriodicTimer(scaladsl and javadsl): usestartTimerWithFixedDelayorstartTimerAtFixedRateinstead. In scaladsl,startPeriodicTimerhad the same semantics asstartTimerAtFixedRate. In javadsl, it had the same semantics asstartTimerWithFixedDelay, which is often preferred.
akka-cluster
UniqueAddressconstructor andUniqueAddress.applywith anIntuid,UniqueAddress.uidandUniqueAddress.copy: use theLonguid constructor orapply, andlongUid.ClusterEvent.CurrentClusterStateconstructors withoutunreachableDataCentersandmemberTombstones: use the main constructor, orCurrentClusterState.apply, which keeps the default arguments.
akka-cluster-sharding
- The deprecated
ClusterShardingSettingsandClusterShardingSettings.TuningParametersconstructors: useClusterShardingSettings(system)orClusterShardingSettings.create(system)with thewith*methods, or the full constructor. ClusterShardingSettings.passivateIdleEntityAfterandwithPassivateIdleAfter: usewithPassivationStrategyandpassivationStrategySettings, see Automatic Passivation.ClusterShardingHealthCheckSettings(names, timeout): use the full constructor.
akka-cluster-sharding-typed
- The deprecated
ClusterShardingSettingsconstructors: useClusterShardingSettings(system)orClusterShardingSettings.create(system)with thewith*methods, or the full constructor. ClusterShardingSettings.passivateIdleEntityAfterandwithPassivateIdleEntityAfter: usewithPassivationStrategyandpassivationStrategySettings, see Automatic Passivation.ShardingProducerController.Settings.resendFirsUnconfirmedIdleTimeoutandwithResendFirsUnconfirmedIdleTimeout: use the correctly spelledresendFirstUnconfirmedIdleTimeoutandwithResendFirstUnconfirmedIdleTimeout.
akka-cluster-tools
DistributedPubSubSettingsconstructor withoutsendToDeadLettersWhenNoSubscribers: use the constructor withsendToDeadLettersWhenNoSubscribers, orDistributedPubSubSettings(config).
akka-cluster-typed
ClusterSingletonSettingsandClusterSingletonManagerSettingsconstructors withoutleaseSettings: use the constructor withleaseSettings.
akka-distributed-data
ReplicatorSettingsconstructors with fewer parameters than the full constructor: use the full constructor,ReplicatorSettings(config)or thewith*methods.ORMap.updated(Cluster, key, initial, modify)(Java API): useORMap.update(SelfUniqueAddress, key, initial, modify).GSet.copy$default$1, a binary compatibility stub in the Scala 2 sources only.
akka-multi-node-testkit
TestConductor.throttle: throttle was not implemented, useblackholeandpassThroughinstead.
akka-persistence
- The LevelDB journal (
akka.persistence.journal.leveldb,LeveldbJournal) and the shared LevelDB journal (akka.persistence.journal.leveldb-shared,SharedLeveldbJournal,SharedLeveldbStore): use another journal implementation, such as Akka Persistence R2DBC. For tests, use theakka.persistence.journal.inmemjournal, in combination with the journal proxy when several actor systems share one journal. Theakka.persistence.journal.leveldbandakka.persistence.journal.leveldb-sharedconfiguration sections no longer exist. DurableStateUpdateStore.deleteObject(persistenceId)inakka.persistence.state.scaladslandakka.persistence.state.javadsl: use thedeleteObjectoverload withrevisioninstead. Durable state store plugins must remove their implementation of the overload withoutrevision.
akka-persistence-query
- The LevelDB read journal (
akka.persistence.query.journal.leveldb,LeveldbReadJournalin scaladsl and javadsl,LeveldbReadJournalProvider): use another journal and query implementation, such as Akka Persistence R2DBC. Theakka.persistence.query.journal.leveldbconfiguration section no longer exists. EventEnvelope(offset, persistenceId, sequenceNr, event)andnew EventEnvelope(offset, persistenceId, sequenceNr, event)inakka.persistence.query: use the overloads with atimestampparameter. TheEventEnvelopecompanion object no longer extendsFunction4.
akka-persistence-typed
snapshotSelectionCriteriain the javadslEventSourcedBehavior,EventSourcedOnCommandBehaviorandEventSourcedOnCommandWithReplyBehavior: overriderecoveryinstead and returnRecovery.withSnapshotSelectionCriteria(...). OverridingsnapshotSelectionCriteriahad no effect since Akka 2.6.5.EventSourcedBehavior.withSnapshotSelectionCriteriain scaladsl: usewithRecovery(Recovery.withSnapshotSelectionCriteria(...)).
akka-remote
AddressUidExtension: useExtendedActorSystem.uidinstead. In generalakka.cluster.UniqueAddressis a better source for getting the uid. With typed Cluster that is accessible viaselfMemberand with classic Cluster viaselfUniqueAddress.akka.remote.serialization.LongSerializer,IntSerializer,StringSerializerandByteStringSerializer: moved toakka.serializationin akka-actor. The serializer ids 18 to 21 are unchanged and used by the akka-actor serializers, so persisted data still deserializes.
akka-stream
ActorMaterializer:Materializerhas all the methodsActorMaterializerhad. Use the system materializer:Materializer.matFromSystemprovides it implicitly when an implicitActorSystem, or anotherClassicActorSystemProvider, is in scope. ReplaceActorMaterializer(...)(context)in an actor withMaterializer(context)orMaterializer.createMaterializer(context), andActorMaterializer(...)(system)withMaterializer(system), to create a separate materializer.- The
ActorMaterializerSettings,IOSettingsandStreamRefSettingsfactories andwith*methods, andMaterializer.settings: configure streams with theakka.stream.materializerconfig, or per stream withActorAttributes,TcpAttributesandStreamRefAttributes. Operators read the settings from their attributes. - The settings accessors are no longer public. Read the attribute that replaces each:
ActorMaterializerSettings.dispatcher:ActorAttributes.dispatcher;initialInputBufferSizeandmaxInputBufferSize:Attributes.inputBuffer;supervisionDecider:ActorAttributes.supervisionStrategy;debugLogging:ActorAttributes.debugLogging;outputBurstLimit:ActorAttributes.outputBurstLimit;fuzzingMode:ActorAttributes.fuzzingMode;maxFixedBufferSize:ActorAttributes.maxFixedBufferSize;syncProcessingLimit:ActorAttributes.syncProcessingLimit;blockingIoDispatcher: theActorAttributes.IODispatcherattribute, which selects theakka.stream.materializer.blocking-io-dispatcherconfig;autoFusing: no replacement, it had no effect.IOSettings.tcpWriteBufferSize:TcpAttributes.tcpWriteBufferSize.StreamSubscriptionTimeoutSettings.modeandtimeout:ActorAttributes.streamSubscriptionTimeout.StreamRefSettings.bufferCapacity,demandRedeliveryInterval,subscriptionTimeoutandfinalTerminationSignalDeadline: theStreamRefAttributesmethods with the same names. IOResult.status,wasSuccessful,getErrorandcreateFailed, andAbruptIOTerminationException: IO operators fail the materialized value withIOOperationIncompleteException.FileIO.fromPathnow also fails the materialized value when the file can’t be read, instead of completing it with a failed status.- The
copy,unapplyandProductmethods ofAttributes: use the explicit methods onAttributes.Attributesno longer extendsProduct. Source.fromFuture,fromCompletionStage,fromFutureSourceandfromSourceCompletionStage: useSource.future,Source.completionStage,Source.futureSourceandSource.completionStageSource.Source.lazilyandSource.lazilyAsync: useSource.lazySource,Source.lazyFutureorSource.lazyCompletionStage.Sink.lazyInitandSink.lazyInitAsync: useSink.lazyFutureSinkorSink.lazyCompletionStageSink.Flow.lazyInitandFlow.lazyInitAsync: useFlow.lazyFutureFloworFlow.lazyCompletionStageFlow.Source.setup,Flow.setupandSink.setup: usefromMaterializer.Source.actorRef(bufferSize, overflowStrategy)andSink.actorRef(ref, onCompleteMessage): use the overloads that take completion and failure matchers, or an on-complete and an on-failure message.Source.actorRefWithAckandSink.actorRefWithAck: useactorRefWithBackpressure.FileIO.fromFileandFileIO.toFile: useFileIO.fromPathandFileIO.toPath.- The
akka.stream.javadsl.Tcp.bindandoutgoingConnectionoverloads that take ascala.concurrent.duration.Duration: use the overloads that take ajava.time.Duration. - The
RestartSource,RestartFlowandRestartSinkoverloads withoutRestartSettings: use the overloads that takeRestartSettings. TimerGraphStageLogic.schedulePeriodically,schedulePeriodicallyWithInitialDelayandMaterializer.schedulePeriodically: usescheduleWithFixedDelayorscheduleAtFixedRate.- The
BindFailedExceptionobject: match on theBindFailedExceptionclass instead.
akka-stream-testkit
TestSink.probeandTestSource.probe(scaladsl): useTestSink()andTestSource()with an implicitClassicActorSystemProviderinstead.TestSink.probe(system)andTestSource.probe(system)(javadsl): useTestSink.create(system)andTestSource.create(system)with aClassicActorSystemProviderinstead.
akka-stream-typed
ActorSource.actorRefWithAck(scaladsl and javadsl): useActorSource.actorRefWithBackpressureinstead.
akka-testkit
akka.testkit.javadsl.TestKitoverloads ofexpectMsgPF,expectTerminated,fishForMessageandfishForSpecificMessagetaking ascala.concurrent.duration.Duration: use the overloads that acceptjava.time.Durationinstead.