Commit eebc06a
authored
feat(kafka): New Kafka utility (#1898)
* Add initial code for KafkaJson and KafkaAvro request handlers.
* Add deserialization via @Deserialization annotation.
* Add TODOs in code.
* Fix typos and make AbstractKafkaDeserializer package private.
* Remove request handler implementation in favor for @Deserialization annotation.
* Parse Timestamp type correctly.
* Remove custom RequestHandler implementation example.
* Make AspectJ version compatible with min version Java 11.
* Clarify exception message when deserialization fails.
* Add more advanced JSON escpaing to JSONSerializer in logging module.
* Add protobuf deserialization logic and fully working example.
* Add Maven profile to compile a JAR with different dependency combinations.
* Add minimal kafka example.
* Add missing copyright.
* Add unit tests for kafka utility.
* Add minimal kafka example to examples module in pom.xml.
* Add some comments.
* Update powertools-examples-kafka with README and make it more minimalistic. Remove powertools-examples-kafka-minimal.
* Implement PR feedback from Karthik.
* Fix SAM outputs.
* Do not fail on unknown properties when deserializating into KafkaEvent.
* Allow customers to bring their own kafka-clients dependency.
* Add Kafka utility documentation.
* Update project version consistently to 2.0.0.
* fix: Fix bug where abbreviated _HANDLER env var did not detect the Deserialization annotation.
* fix: Bug when trying to deserialize a type into itself for Lambda default behavior. We can just return the type itself. Relevant for simple String and InputStream handlers.
* When falling back to Lambda default, handle conversion between InputStream and String.
* Raise a runtime exception when the KafkaEvent is invalid.
* docs: Announce deprecation of v1
* fix(metrics): Do not flush when no metrics were added to avoid printing root-level _aws dict (#1891)
* fix(metrics): Do not flush when no metrics were added to avoid printing root-level _aws dict.
* Fix pmd linting failures.
* Rename docs to Kafka Consumer and add line highlights for code examples.
* Fix Spotbug issues.
* Reduce cognitive complexity of DeserializationUtils making it more modular and representing handler information in a simple HandlerInfo class.
* Reduce cognitive complexity of AbstractKafkaDeserializer.
* Enable removal policy DESTROY on e2e test for kinesis streams and SQS queues to avoid exceeding account limit.
* Replace System.out with Powertools Logging.
* Add notice about kafka-clients compatibility.
* Add sentence stating that Avro / Protobuf classes can be autogenerated.1 parent 8a040ac commit eebc06a
File tree
76 files changed
+7413
-21
lines changed- docs/utilities
- examples
- powertools-examples-kafka
- events
- src/main
- avro
- java/org/demo/kafka
- avro
- protobuf
- proto
- resources
- tools
- src/main/java/org/demo/kafka
- avro
- protobuf
- tools
- powertools-e2e-tests
- handlers
- batch
- idempotency
- largemessage_idempotent
- largemessage
- logging
- metrics
- parameters
- tracing
- validation-alb-event
- validation-apigw-event
- src/test/java/software/amazon/lambda/powertools/testutils
- powertools-kafka
- src
- main
- java/software/amazon/lambda/powertools/kafka
- internal
- serializers
- resources/META-INF/services
- test
- avro
- java/software/amazon/lambda/powertools/kafka
- internal
- serializers
- testutils
- proto
- resources
- powertools-logging
- powertools-logging-logback/src/test/java/software/amazon/lambda/powertools/logging/internal
- src/main/java/software/amazon/lambda/powertools/logging/internal
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
76 files changed
+7413
-21
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments