GH-881 - Support for SpEL expression in routing targets.

We now support SpEL expressions in routing targets for events to be externalized. Introduced a BrokerRouting.getTarget(Object) overload to allow access to the event object in the SpEL expression. To support those, event externalizers will have to call that method where they previously called ….getTarget().
This commit is contained in:
Oliver Drotbohm
2024-10-18 21:01:28 +02:00
parent 8d067e8107
commit d5477d1423
12 changed files with 118 additions and 23 deletions

View File

@@ -404,7 +404,7 @@ By default, no routing key is used.
=== Annotation-based Event Externalization Configuration
To define a custom routing key via the `@Externalized` annotations, a pattern of `$target::$key` can be used for the target/value attribute available in each of the particular annotations.
The key can be a SpEL expression which will get the event instance configured as root object.
Both the target and key can be a SpEL expression which will get the event instance configured as root object.
.Defining a dynamic routing key via SpEL expression
[tabs]