kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Menke <jme...@numerix.com>
Subject Match Producer and RecordMetadata with Consumer and ConsumerRecord
Date Wed, 09 Dec 2015 17:30:22 GMT
Can a correlationID be created from a ConsumerRecord that will allow for identification of
the corresponding RecordMetaData instance that was returned from the Producer.send() method?

I am Looking at the JavaDocs and the Producer returns RecordMetadata which has the following
signature:

RecordMetadata(TopicPartition topicPartition, long baseOffset, long relativeOffset) 
	
I am not sure if this can match to 
	
ConsumerRecord(java.lang.String topic, int partition, long offset, K key, V value)

Can we match producer requests to Consumer Records by matching these values?

RecordMetaData.TopicPartion.topic = ConsumerRecord.topic
RecordMetaData.TopicPartion.partition = ConsumerRecord.partition
RecordMetaData(baseOffset + relativeOffset) = ConsumerRecord.offset

In other words, can a CorrelationID be created from these values that will allow Consumers
to link back to the Producer send() event.  (In the client calling code)




	

Mime
View raw message