PayloadWithMetadata Class
Description
A case class that contains decoded stream record data and related metadata.
Summary
case class PayloadWithMetadata[V](
topicName: String = "",
partitionId: Short = -1,
createTimeMs: Long = -1,
createTimeNano: Long = -1,
recordKey: Long = -1,
payload: V = null.asInstanceOf[V])
Instance Constructors
Syntax
PayloadWithMetadata[V](
topicName: String,
partitionId: Short,
createTimeMs: Long,
createTimeNano: Long,
recordKey: Long1,
payload: V)
Parameters and Data Members
- topicName
The name of the stream that contains the record.
- Type: String
- partitionId
The ID of the stream shard that contains the record (see Stream Sharding and Partitioning).
- Type:
Short
- Type:
- createTimeMs
The record's ingestion time (the time at which the record arrived at the platform), as a Unix timestamp in milliseconds. For example,
1511260205000
indicates that the record was ingested on 21 Nov 2017 at 10:30:05 AM. ThecreateTimeNano parameter holds the nanoseconds unit of the ingestion time.- Type:
Long
- Type:
- createTimeNano
The nanoseconds unit of the
createTimeMs ingestion-time timestamp. For example, ifcreateTimeMs is1511260205000
andcreateTimeNano is500000000
, the record was ingested on 21 Nov 2017 at 10:30 AM and 5.5 seconds.- Type:
Long
- Type:
- recordKey
The record's sequence number (see Stream Record Consumption).
- Type:
Long
- Type:
- payload
Decoded record data, formatted as the value type of the current class instance (
V ).Type:
V
Type Parameters
V — the data type into which to convert the record's data payload ("value").