Commit a991cfd
committed
feat: add AWS S3 sidelining (aka claim check)
Add feature to extract and send (sideline) EventBridge event value, which is
the content of the Kafka record value, to S3 by a given JSON Path. The event
with the transformed value is send to EventBridge with the reference to the S3
object and the used JSON Path.
The feature is activated if the S3 bucket (e.g. 'my-bucket') is configured for
the connector by:
```json5
{
"config": {
// other required configuration
"aws.eventbridge.offloading.s3.default.bucket": "my-bucket"
}
}
```
The user must have write access to the configured bucket.
The default JSON Path is `$.detail.value` referencing a EventBridge entry. A
valid JSON Path must start with `$.detail.value` and must reference a single
JSON object, array or value.
The JSON Path can be configured for the connector by:
```json5
{
"config": {
// other required configuration
"aws.eventbridge.offloading.default.fieldref": "$.detail.value"
}
}
```
If the JSON Path does not match, nothing is send to S3. Otherwise, if the JSON
Path matches a non `null` JSON object, array or value, this value is send to S3
and the JSON attribute is removed. If the value is `null` and matches the JSON
Path, the JSON attribute with it's `null` value is keept and nothing send to
S3.
If the feature is activated and a value was send to S3, the EventBridge event
contains the attribute `$.detail.datarefJsonPath` with the configured JSON Path
and the S3 object reference at `$.detail.dataref`. Otherwise the EventBridge
event is unchanged.
A FIFO cache with a maximum size of 10.000 is used to look the uploaded content
to S3 by it's SHA512 and re-use the S3 object key whenever possible.
Closes #110.1 parent 714b868 commit a991cfd
File tree
21 files changed
+2014
-268
lines changed- e2e
- src
- main/java/software/amazon/event/kafkaconnector
- cache
- offloading
- util
- test/java/software/amazon/event/kafkaconnector
- cache
- offloading
21 files changed
+2014
-268
lines changed| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
| |||
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
103 | 119 | | |
104 | 120 | | |
105 | 121 | | |
| |||
122 | 138 | | |
123 | 139 | | |
124 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
125 | 145 | | |
126 | 146 | | |
127 | 147 | | |
| |||
157 | 177 | | |
158 | 178 | | |
159 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
160 | 185 | | |
161 | 186 | | |
162 | 187 | | |
| |||
177 | 202 | | |
178 | 203 | | |
179 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
180 | 210 | | |
181 | 211 | | |
182 | 212 | | |
| |||
240 | 270 | | |
241 | 271 | | |
242 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
243 | 278 | | |
244 | 279 | | |
245 | 280 | | |
| |||
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
56 | 71 | | |
57 | 72 | | |
58 | 73 | | |
| |||
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
84 | | - | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
| 102 | + | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
| |||
100 | 116 | | |
101 | 117 | | |
102 | 118 | | |
| 119 | + | |
| 120 | + | |
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
| |||
113 | 131 | | |
114 | 132 | | |
115 | 133 | | |
116 | | - | |
| 134 | + | |
| 135 | + | |
117 | 136 | | |
118 | 137 | | |
119 | 138 | | |
| |||
124 | 143 | | |
125 | 144 | | |
126 | 145 | | |
127 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
128 | 149 | | |
129 | 150 | | |
130 | 151 | | |
| |||
154 | 175 | | |
155 | 176 | | |
156 | 177 | | |
157 | | - | |
158 | 178 | | |
159 | 179 | | |
160 | 180 | | |
| |||
181 | 201 | | |
182 | 202 | | |
183 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
184 | 216 | | |
185 | 217 | | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
95 | 108 | | |
96 | 109 | | |
97 | 110 | | |
| |||
208 | 221 | | |
209 | 222 | | |
210 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
211 | 245 | | |
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
104 | 130 | | |
105 | 131 | | |
106 | 132 | | |
| |||
126 | 152 | | |
127 | 153 | | |
128 | 154 | | |
| 155 | + | |
129 | 156 | | |
130 | 157 | | |
131 | 158 | | |
| |||
143 | 170 | | |
144 | 171 | | |
145 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
146 | 181 | | |
147 | 182 | | |
148 | | - | |
| 183 | + | |
149 | 184 | | |
150 | 185 | | |
151 | 186 | | |
| |||
Lines changed: 12 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 | + | |
0 commit comments