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
//! Formats a kafka record as a json object.
//! ```json
//! {
//! "value": "{ \"name\": \"Tarte Tatin\", \"ingredients\": [\"apples\", \"puff pastry\", \"butter\", \"sugar\"], \"instructions\": \"Caramelize apples in butter and sugar, top with puff pastry, and bake.\"},",
//! "key": "1",
//! "topic": "patisserie-delights-dlq",
//! "timestamp": 1727734680195,
//! "partition": 0,
//! "offset": 529896,
//! "headers": {
//! "kafka_dlt-exception-fqcn": "panic: runtime error: invalid memory address or nil pointer dereference",
//! "kafka_dlt-exception-message": "The cooking process has failed",
//! "kafka_dlt-exception-stacktrace": "[signal SIGSEGV: segmentation violation code=0xffffffff addr=0x0 pc=0x20314]",
//! "kafka_dlt-original-offset": "197939",
//! "kafka_dlt-original-partition": "0",
//! "kafka_dlt-original-topic": "patisserie-delights-dlq",
//! "kafka_timestampType": "2024-09-30T22:18:00.193234027Z"
//! }
//! }
//! ```
use KafkaRecord;
use KafkaFormatter;