Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does the release of a
core-java
library version1.6.0
.This release brings numerous API improvements, as well as fixes and infrastructure updates to the framework.
API changes
Client
postAndForget()
a command is added to theClient
. This method should be called when the user does not care about events/rejections produced by a command.The previously used
post()
method is reserved for cases when one or more event types are actually observed by the client. The value returned bypost()
can no longer be ignored [Post and forget #1292].AbstractEventReactor
) as well as events not explicitly declared in anyBoundedContext
[Propagate all events to subscriptions #1258].Client
is extended with methods to handle streaming and server errors when executing requests [Handle error acks #1270].Server
ServerEnvironment
parts #1274, Improve custom environments support #1293].The
Environment
now exposes API to register user-defined environment types and to determine which one is enabled at any given moment of time. See the release notes ofbase
.The
ServerEnvironment
allows to configure environment-dependent values, as follows:The Spine framework provides two environments out of the box:
Production
andTests
.@Internal
methods ofBoundedContext
moved to its internal classInternalAccess
instance of which is available via theinternalAccess()
method.The method is available only to the server-side framework code.
Delivery
[Async message delivery and improvements for Subscriptions #1265].Pair
can now be created from an already existingOptional
[Pair onOptional
#1296].CommandBus
filters which throw rejections is added [Improve support of rejections thrown from theCommandBus
filters #1295].Model
@External
annotation is introduced to mark the handler method parameters of an external origin. It replaces the previously used for this purpose(external = true)
attribute of@Subscribe
,@React
and@Command
annotation. The attribute is deprecated [@External
annotation #1269].(set_once)
constraint in entity states is no longer ignored [(set_once)
in entities #1268].@ByField
is deprecated in favour of@Where
[Handle error acks #1270].Logging
DiagnosticLog
messages are made more detailed [Improve error messages #1262].Testing
Various quality-of-life changes are introduced for the testing API.
See #1249, #1251, #1252, and #1261 for details.
Some of the testing API changes are breaking. They include:
BlackBoxBoundedContext
is renamed toBlackBoxContext
.Verify
-based API is removed.BlackBoxContext
no longer exposeseventBus()
andcommandBus()
.subscribe(Topic)
semantics changed. See Improvements for testing utilities (part 1) #1249.UserId
andZoneId
parameters ofBlackBoxContext
.Fixes
The
Migration
logic is fixed to properly support entity state updates [#1298].Infrastructure
The project build scripts are migrated to Kotlin [#1278].