See if you can use a custom interceptors for this.
The only fuzzy thing is that the clocks would be different so I would be a 
little skeptical of its accuracy.
I have heard of some companies who have a special topic in which they insert 
test msgs and then read them back - using the same machine for producer and 
consumer, thereby doing away with this dilemma.
The assumption is that any delay in the cluster would be felt everywhere.
Another option is to create topics with one replica on all brokers (i.e. # of 
topics = # of brokers) - so you can be sensitive to a single broker having an 
issue.

On 7/19/18, 3:09 PM, "antonio saldivar" <[email protected]> wrote:

    Hello
    
    I am developing an application using kafka and flink, I need to be able to
    measure the latency from the producer and when it comes out to the sink.
    
    I can append the timestamp in Millisecond when I send the trxn from the
    producer but at the end how to append the timestamp when it comes out the
    sink.
    
    Someone can help me with an example
    
    Thank you
    Best Regards
    

Reply via email to