Skip to content

Commit b30891f

Browse files
authored
feat: Extract generic type for KafkaListeners in batch mode (#89)
* feat: Extract generic type for KafkaListeners in batch mode The KafkaPayloadTypeExtractor contains the logic to extract the payload type, which previously was part of ClassLevelKafkaListenerScanner and MethodLevelKafkaListenerScanner. If the parameter is of type List<?>, reflection is used to extract the underlying type. To demo it, one listener in ExampleConsumer is updated to use batch mode. * chore: Fix for batch listener asyncapi.json * chore: Remove unused ReflectionUtils * chore: Move OperationData scanner code to AbstractOperationDataScanner * chore: Use SpringPayloadAnnotationTypeExtractor also in amqp * chore: Catch all exceptions in getPayloadParameterClass * fix: Use sorted channels Fixes nondeterministic (HashMap) ordering when channels for the same topic are merged * chore: Extract duplicate code to KafkaListenerUtil * chore: Split scanner package by annotation and operationData * Fix test after rebase
1 parent 76f0e50 commit b30891f

File tree

31 files changed

+699
-705
lines changed

31 files changed

+699
-705
lines changed

springwolf-core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies {
2525

2626
implementation 'org.springframework:spring-web'
2727
implementation 'org.springframework:spring-context'
28+
implementation 'org.springframework:spring-messaging'
2829
implementation 'org.springframework.boot:spring-boot-autoconfigure'
2930

3031
implementation 'com.google.guava:guava:31.1-jre'

springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/AbstractMethodLevelListenerScanner.java

Lines changed: 0 additions & 172 deletions
This file was deleted.

springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/ConsumerChannelScanner.java

Lines changed: 0 additions & 96 deletions
This file was deleted.

springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/ProducerChannelScanner.java

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)