Package io.confluent.parallelconsumer
Class RecordContext<K,V>
java.lang.Object
io.confluent.parallelconsumer.RecordContext<K,V>
Context information for the wrapped
ConsumerRecord.
Includes all accessors (~getters) in ConsumerRecord via delegation (Delegate).
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRecordContext(WorkContainer<K, V> wc) RecordContext(WorkContainer<K, V> workContainer, org.apache.kafka.clients.consumer.ConsumerRecord<K, V> consumerRecord) -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> RecordContext.RecordContextBuilder<K, V> builder()protected booleanbooleanintA useful ID class for consumer records.protected WorkContainer<K,V> inthashCode()org.apache.kafka.common.header.Headersheaders()key()longoffset()intintintlongorg.apache.kafka.common.record.TimestampTypetopic()toString()value()
-
Field Details
-
workContainer
-
-
Constructor Details
-
RecordContext
-
RecordContext
public RecordContext(WorkContainer<K, V> workContainer, org.apache.kafka.clients.consumer.ConsumerRecord<K, V> consumerRecord)
-
-
Method Details
-
getRecordId
A useful ID class for consumer records.- Returns:
- the ID for the contained record
-
getNumberOfFailedAttempts
public int getNumberOfFailedAttempts()- Returns:
- the number of times this
ConsumerRecordhas failed processing already
-
getLastFailureAt
- Returns:
- if the record has failed, return the time at which is last failed at
-
getSucceededAt
- Returns:
- if the record had succeeded, returns the time at this the user function returned
-
builder
-
toBuilder
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getWorkContainer
-
getConsumerRecord
-
topic
-
partition
public int partition() -
headers
public org.apache.kafka.common.header.Headers headers() -
key
-
value
-
offset
public long offset() -
timestamp
public long timestamp() -
timestampType
public org.apache.kafka.common.record.TimestampType timestampType() -
serializedKeySize
public int serializedKeySize() -
serializedValueSize
public int serializedValueSize() -
leaderEpoch
-