<@U078Y59KC3B> Hello everyone, just a quick questi...
# ask-ai
p
@RunLLM Hello everyone, just a quick question. Do pulsar messages have an topic insert timestamp? And if so, can i access it using the org.apache.pulsar.client package in java?
r
Yes, Pulsar messages have a publish time, which is the timestamp when the message is published to the topic. This is automatically set by the producer and is accessible via the
getPublishTime()
method in the
org.apache.pulsar.client.api.Message
interface in Java. There is no separate "topic insert timestamp"β€”the publish time serves this purpose. See Message.java and Pulsar messaging concepts. Would you like a code example for accessing the publish time? Sources: - Message.java - Pulsar messaging concepts πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.