Given a message like this:
{ "message": {"accountId":1,"timestamp":"1694709688878","amount":1001,"sentFromClientAt":1694709688913}, "delivered_at": 1694709688954 }
The kcat command can be used with jq to format message, even a calculated attribute:
kcat -C -b localhost:31090 -f '{ "message": %s, "delivered_at": %T } \n' -t input-topic -u | jq '. + { "took": "\(.delivered_at - .message.sentFromClientAt) ms" }'