Deprecated API
Contents
- Terminally Deprecated
- Interfaces
- Classes
- Exception Classes
- Annotation Interfaces
- Methods
- Constructors
-
Terminally Deprecated ElementsElementDescriptionResponses are sent in a non-blocking fashion and don't need a dedicated thread pool anymoreResponses are sent in a non-blocking fashion and don't need a dedicated thread pool anymoreas this method purely exists for interoperability between Axon Framework 4 and Axon Framework 5Temporary bridge for reading Axon Framework 4 multi-source token stores after upgrading. Scheduled for removal in 5.5.0, once existing stores have migrated to the Axon Framework 5 token class names.Register a
LocalQueryDispatchPredicatecomponent instead, which offers the same local shortcut with per-query control. SeeDistributedQueryBusConfiguration.preferLocalQueryHandler(boolean).Register aLocalQueryDispatchPredicatecomponent instead, which offers the same local shortcut with per-query control. Enabling this flag is equivalent to registering a predicate that always returnstrue; disabling it is equivalent to registering no predicate. Both settings continue to work by installing aLocalShortcutQueryBusConnectoron theQueryBusConnector.useEventAssociationsUtils.equalsTo(Object)instead.useEventAssociationsUtils.metadataProperty(String)instead.useEventAssociationsUtils.payloadProperty(String)instead.Only intended to drain Axon Framework 4 XStream-serialized sagas, deadlines, and scheduled events during a migration period. Remove it from an application's configuration once that data no longer exists.in favor ofEntityNotFoundException, which more broadly serves anyRepositorybeing unable to find or> recreate an entityuseSourcingCondition.strategy()'s and check for theabsolute modeUseClockUtils.set(Clock)if you have to provide a non-defaultClockinstance.in favor ofHandlerExecutionException.getDetails(Class), or any of theType,TypeReference, orConverterparameter combinations, as those ensure the details are converted to the desired typeUseEventHandlingComponentsConfigurer.ComponentsPhase.autodetected(String, ComponentBuilder)to provide an explicit component name. When no name is provided, the component receives its registration index as the name. Note that the generated index may differ across environments or application restarts, so it should not be relied upon for stable identification (e.g., in dead letter queues).UseEventHandlingComponentsConfigurer.ComponentsPhase.declarative(String, ComponentBuilder)to provide an explicit component name. When no name is provided, the component receives its registration index as the name. Note that the generated index may differ across environments or application restarts, so it should not be relied upon for stable identification (e.g., in dead letter queues).UseClockUtils.set(Clock)if you have to provide a non-defaultClockinstance.UseClockUtils.set(Clock)if you have to provide a non-defaultClockinstance.Temporary bridge for reading Axon Framework 4 token stores after upgrading. Scheduled for removal in 5.5.0, once existing stores have migrated to the Axon Framework 5 token class names.Temporary bridge for reading Axon Framework 4 token stores after upgrading. Scheduled for removal in 5.5.0, once existing stores have migrated to the Axon Framework 5 token class names.in favor ofSubscribingEventProcessor.processAsync(List, ProcessingContext), which reports completion and failures through the returnedCompletableFuturerather than blocking the calling thread. This method is retained for backward compatibility and blocks until processing finishes.in favor ofAnnotationBasedEntityEvolvingComponent(Class, EventConverter, MessageTypeResolver, ParameterResolverFactory, HandlerDefinition)since this allows for clean customization of theParameterResolverFactoryandHandlerDefinition, which this constructor does notTheaxon-legacymodule exists to let already-running Axon Framework 4 Sagas drain out, not to start new ones. Model new business processes as a Workflow or a Stateful Event Handler instead. This annotation remains functional so already-running sagas keep starting related saga instances correctly, but declaring it on new saga types is discouraged.UseAxonTestPhase.Then.Command.resultMessagePayloadSatisfies(Class, Consumer)instead, which automatically handles payload conversion for distributed setups where conversion is necessary.There is no transience check to disable. Delete the call.
-
Deprecated InterfacesInterfaceDescriptionTemporary bridge for reading Axon Framework 4 token stores after upgrading. Scheduled for removal in 5.5.0, once existing stores have migrated to the Axon Framework 5 token class names.
-
Deprecated ClassesClassDescriptionTemporary bridge for reading Axon Framework 4 multi-source token stores after upgrading. Scheduled for removal in 5.5.0, once existing stores have migrated to the Axon Framework 5 token class names.Only intended to drain Axon Framework 4 XStream-serialized sagas, deadlines, and scheduled events during a migration period. Remove it from an application's configuration once that data no longer exists.Only in use for legacy "sync" components.Temporary bridge for reading Axon Framework 4 token stores after upgrading. Scheduled for removal in 5.5.0, once existing stores have migrated to the Axon Framework 5 token class names.Coupling the id resolver directly to the
AnnotatedEntityMetamodelprevents theEntityMetamodelfrom being decorated or replaced, since resolution would break whenever the registered component is not anAnnotatedEntityMetamodel. Payload conversion to the handler's expected representation is now applied independently of the metamodel component, so annotation-based resolution only needs the plainAnnotationBasedEntityIdResolver. No direct replacement is required.Performing the payload conversion inside the resolver ties it to theAnnotatedEntityMetamodel, which prevents theEntityMetamodelcomponent from being decorated or replaced. Payload conversion is now applied independently of the metamodel component, so annotation-based id resolution only needs the plainAnnotationBasedEntityIdResolverDefinition. This definition remains functional for existing configurations but requires the resolvedEntityMetamodelto be anAnnotatedEntityMetamodel.
-
Deprecated Exception ClassesException ClassDescriptionin favor of
EntityNotFoundException, which more broadly serves anyRepositorybeing unable to find or> recreate an entity
-
Deprecated Annotation InterfacesAnnotation InterfaceDescriptionThe
axon-legacymodule exists to let already-running Axon Framework 4 Sagas drain out, not to start new ones. Model new business processes as a Workflow or a Stateful Event Handler instead. This annotation remains functional so already-running sagas keep starting related saga instances correctly, but declaring it on new saga types is discouraged.
-
Deprecated MethodsMethodDescriptionResponses are sent in a non-blocking fashion and don't need a dedicated thread pool anymoreResponses are sent in a non-blocking fashion and don't need a dedicated thread pool anymoreas this method purely exists for interoperability between Axon Framework 4 and Axon Framework 5Register a
LocalQueryDispatchPredicatecomponent instead, which offers the same local shortcut with per-query control. SeeDistributedQueryBusConfiguration.preferLocalQueryHandler(boolean).Register aLocalQueryDispatchPredicatecomponent instead, which offers the same local shortcut with per-query control. Enabling this flag is equivalent to registering a predicate that always returnstrue; disabling it is equivalent to registering no predicate. Both settings continue to work by installing aLocalShortcutQueryBusConnectoron theQueryBusConnector.useEventAssociationsUtils.equalsTo(Object)instead.useEventAssociationsUtils.metadataProperty(String)instead.useEventAssociationsUtils.payloadProperty(String)instead.scheduling new deadlines through aDeadlineManageris supported only to keep Axon Framework 4 code running while migrating. Schedule a command with a scheduler of choice that dispatches it through theCommandGatewayinstead, or replace the Saga with a Workflowscheduling new deadlines through aDeadlineManageris supported only to keep Axon Framework 4 code running while migrating. Schedule a command with a scheduler of choice that dispatches it through theCommandGatewayinstead, or replace the Saga with a Workflowscheduling new deadlines through aDeadlineManageris supported only to keep Axon Framework 4 code running while migrating. Schedule a command with a scheduler of choice that dispatches it through theCommandGatewayinstead, or replace the Saga with a Workflowscheduling new deadlines through aDeadlineManageris supported only to keep Axon Framework 4 code running while migrating. Schedule a command with a scheduler of choice that dispatches it through theCommandGatewayinstead, or replace the Saga with a Workflowscheduling new deadlines through aDeadlineManageris supported only to keep Axon Framework 4 code running while migrating. Schedule a command with a scheduler of choice that dispatches it through theCommandGatewayinstead, or replace the Saga with a Workflowscheduling new deadlines through aDeadlineManageris supported only to keep Axon Framework 4 code running while migrating. Schedule a command with a scheduler of choice that dispatches it through theCommandGatewayinstead, or replace the Saga with a WorkflowuseGenericDeadlineMessage.asDeadlineMessage(String, Object, Instant)instead, as it sets the timestamp of the deadline, rather than the current timeKept so that jobs scheduled through this signature still fire. New jobs callJobRunrDeadlineManager.execute(String, String).useSourcingCondition.strategy()'s and check for theabsolute modeIn favor of using the constructor, as we intend to enforce thinking about thetype.in favor ofHandlerExecutionException.getDetails(Class), or any of theType,TypeReference, orConverterparameter combinations, as those ensure the details are converted to the desired typeUseEventHandlingComponentsConfigurer.ComponentsPhase.autodetected(String, ComponentBuilder)to provide an explicit component name. When no name is provided, the component receives its registration index as the name. Note that the generated index may differ across environments or application restarts, so it should not be relied upon for stable identification (e.g., in dead letter queues).UseEventHandlingComponentsConfigurer.ComponentsPhase.declarative(String, ComponentBuilder)to provide an explicit component name. When no name is provided, the component receives its registration index as the name. Note that the generated index may differ across environments or application restarts, so it should not be relied upon for stable identification (e.g., in dead letter queues).UseClockUtils.set(Clock)if you have to provide a non-defaultClockinstance.UseClockUtils.set(Clock)if you have to provide a non-defaultClockinstance.in favor ofSubscribingEventProcessor.processAsync(List, ProcessingContext), which reports completion and failures through the returnedCompletableFuturerather than blocking the calling thread. This method is retained for backward compatibility and blocks until processing finishes.Saga stores do not track tokens, and no implementation returns anything butnull. Retained only so that existing implementations of this interface keep compiling.in favor ofStubDeadlineManager.getTriggeredDeadlines()UseAxonTestPhase.Then.Command.resultMessagePayloadSatisfies(Class, Consumer)instead, which automatically handles payload conversion for distributed setups where conversion is necessary.There is no transience check to disable. Delete the call.
-
Deprecated ConstructorsConstructorDescriptionin favor of
InMemorySnapshotStore(Converter)UseClockUtils.set(Clock)if you have to provide a non-defaultClockinstance.configure theMetricsConfigurationEnhancerthrough theMicrometerMetricsConfigurationcomponent insteadconfigure theMetricsConfigurationEnhancerthrough theMicrometerMetricsConfigurationcomponent insteadin favor of theAnnotationSpecification(Class, String, Class, String, Class, String)constructor that allows annotation configuration per resolvable attributein favor ofAnnotationBasedEntityEvolvingComponent(Class, EventConverter, MessageTypeResolver, ParameterResolverFactory, HandlerDefinition)since this allows for clean customization of theParameterResolverFactoryandHandlerDefinition, which this constructor does not