Skip to content

Commit b9cd166

Browse files
authored
docs: Improve extract classes documentation (#82)
1 parent d00a729 commit b9cd166

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/configuration/documenting-messages.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ Some wrappers are automatically unwrapped, including `Message<String>`, which be
5656
The [configuration property](configuration.mdx) to modify the defaults is currently in _beta_.
5757
:::
5858

59-
Assuming a method signature of `sendMessage(Function<Void, String> msg)`, where the actual payload is located in parameter index 1 (String).
60-
Adding the configuration property `springwolf.payload.extractable-classes.java.util.function.Function=1` tells Springwolf how to handle this payload type.
59+
Assuming a method signature of `sendMessage(ConsumerRecord<String, MyEvent> msg)`, where the actual payload is located in parameter index 1 (String).
60+
Adding the configuration property `springwolf.payload.extractable-classes.org.apache.kafka.clients.consumer.ConsumerRecord=1` tells Springwolf how to handle this payload type.
6161

62-
The configuration property is split into three parts.
63-
First, the base property `springwolf.payload.extractable-classes`.
64-
Second, the canonical class name, `java.util.function.Function` in this case.
65-
And third, the generic parameter index (`1`).
62+
The configuration property is split into three parts:
63+
64+
1. The base configuration property `springwolf.payload.extractable-classes`.
65+
2. The canonical class name, `org.apache.kafka.clients.consumer.ConsumerRecord` in this case.
66+
3. The parameter index (`1`) of the actual payload class (`MyEvent`).
6667

6768
## Schema
6869

0 commit comments

Comments
 (0)