class: KafkaRecord
[25:14] (extern: com.lehman.aussom.KafkaRecord) extends: object
One received record: pure data handed to poll callers and listener handlers. Key and value decode lazily per the owning client's key/value formats (string or bytes). Records are never constructed from Aussom code - the producer's send() takes plain arguments.
Methods
-
getTopic ()
Gets the record's topic.
- @r
Astring with the topic name.
- @r
-
getPartition ()
Gets the record's partition.
- @r
Anint with the partition number.
- @r
-
getOffset ()
Gets the record's offset within its partition.
- @r
Anint with the offset.
- @r
-
getKey ()
Gets the record key per the client's key format.
- @r
Astring or Buffer with the key, or null.
- @r
-
getValue ()
Gets the record value per the client's value format. A null value is a tombstone on a compacted topic.
- @r
Astring or Buffer with the value, or null.
- @r
-
getTimestamp ()
Gets the record timestamp.
- @r
Anint with milliseconds since the epoch.
- @r
-
getTimestampType ()
Gets the timestamp type.
- @r
Astring: create_time or log_append_time.
- @r
-
getHeaderMap ()
Gets all headers as one map - the ergonomic default. The last value wins on a duplicate key.
- @r
Amap of header name to value.
- @r
-
getHeaders ()
Gets all headers as the lossless ordered list, for the rare record carrying duplicate keys.
- @r
Alist of { "key": s, "value": v } maps.
- @r
-
getHeader (
string Name)Gets the last header value for a name.
- @p
Nameis a string with the header name. - @r
Theheader value, or null.
- @p
-
getHeaderNames ()
Gets the distinct header names in first-seen order.
- @r
Alist of strings.
- @r
-
getLeaderEpoch ()
Gets the leader epoch when the broker supplied one.
- @r
Anint with the epoch, or null.
- @r
-
getSerializedKeySize ()
Gets the serialized key size.
- @r
Anint with the size in bytes (-1 for a null key).
- @r
-
getSerializedValueSize ()
Gets the serialized value size.
- @r
Anint with the size in bytes (-1 for a null value).
- @r
-
getDeliveryCount ()
Gets the delivery count. Share-group records only.
- @r
Anint with the delivery count, or null.
- @r