From f7a3aab794ca76bb81ebb3dd67f74b052c7db6ff Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Wed, 27 Mar 2019 11:45:44 +0100 Subject: [PATCH] add Kafka::Message::timestamp --- Rdkafka.xs | 9 +++++++++ lib/Kafka/Librd.pm | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/Rdkafka.xs b/Rdkafka.xs index 3b13406..5fe3f67 100644 --- a/Rdkafka.xs +++ b/Rdkafka.xs @@ -392,6 +392,15 @@ krdm_offset(msg) OUTPUT: RETVAL +long +krdm_timestamp(msg) + rd_kafka_message_t* msg + CODE: + rd_kafka_timestamp_type_t tstype; + RETVAL = rd_kafka_message_timestamp(msg, &tstype); + OUTPUT: + RETVAL + void krdm_DESTROY(msg) rd_kafka_message_t* msg diff --git a/lib/Kafka/Librd.pm b/lib/Kafka/Librd.pm index c96e129..df542fd 100644 --- a/lib/Kafka/Librd.pm +++ b/lib/Kafka/Librd.pm @@ -233,6 +233,10 @@ return message key return message payload +=head2 timestamp + +return message timestamp (milliseconds since UNIX epoch) + =cut package Kafka::Librd;