From 0c805e049ef80474623b3efd3181467c964bd33d Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Tue, 11 Jun 2024 16:15:54 -0300 Subject: [PATCH] docs: add changelog for message transformation --- changes/ee/feat-13199.en.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 changes/ee/feat-13199.en.md diff --git a/changes/ee/feat-13199.en.md b/changes/ee/feat-13199.en.md new file mode 100644 index 000000000..06e9b057c --- /dev/null +++ b/changes/ee/feat-13199.en.md @@ -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])"} + ] + } + ] +} + +```