Merge pull request #13232 from thalesmg/mt-changelog-m-20240611

docs: add changelog for message transformation
This commit is contained in:
Thales Macedo Garitezi 2024-06-13 09:11:07 -03:00 committed by GitHub
commit b6613e7b27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
Implemented the Message Enrichment and Transformation feature.
This allows users to transform incoming messages without the need to define SQL rules in the Rule Engine, just by using simple variform syntax.
For example: if we want to take an incoming message encoded as Avro, decode it to JSON and then take the `tenant` client attribute from the publishing client and prefix it to the topic, before processing the result in Rule Engine, one would only need a transformation with the following configuration:
```hocon
message_transformation {
transformations = [
{
name = mytransformation
enable = true
failure_action = drop
payload_decoder = {type = avro, schema = myschema}
payload_encoder = {type = json}
operations = [
{key = "topic", value = "concat([client_attrs.tenant, '/', topic])"}
]
}
]
}
```