Package io.vertx.kafka.client.producer
Class RecordMetadata
java.lang.Object
io.vertx.kafka.client.producer.RecordMetadata
Metadata related to a Kafka record
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorRecordMetadata(long offset, int partition, long timestamp, String topic) ConstructorRecordMetadata(JsonObject json) Constructor (from JSON representation) -
Method Summary
Modifier and TypeMethodDescriptionlongintlonggetTopic()setOffset(long offset) Set the offset of the record in the topic/partition.setPartition(int partition) Set the partition the record was sent tosetTimestamp(long timestamp) Set the timestamp of the record in the topic/partitionSet the topic the record was appended totoJson()Convert object to JSON representation
-
Constructor Details
-
RecordMetadata
public RecordMetadata()Constructor -
RecordMetadata
Constructor- Parameters:
offset- the offset of the record in the topic/partition.partition- the partition the record was sent totimestamp- the timestamp of the record in the topic/partitiontopic- the topic the record was appended to
-
RecordMetadata
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
-
Method Details
-
getOffset
public long getOffset()- Returns:
- the offset of the record in the topic/partition.
-
setOffset
Set the offset of the record in the topic/partition.- Parameters:
offset- offset of the record in the topic/partition- Returns:
- current instance of the class to be fluent
-
getPartition
public int getPartition()- Returns:
- the partition the record was sent to
-
setPartition
Set the partition the record was sent to- Parameters:
partition- the partition the record was sent to- Returns:
- current instance of the class to be fluent
-
getTimestamp
public long getTimestamp()- Returns:
- the timestamp of the record in the topic/partition
-
setTimestamp
Set the timestamp of the record in the topic/partition- Parameters:
timestamp- the timestamp of the record in the topic/partition- Returns:
- current instance of the class to be fluent
-
getTopic
- Returns:
- the topic the record was appended to
-
setTopic
Set the topic the record was appended to- Parameters:
topic- the topic the record was appended to- Returns:
- current instance of the class to be fluent
-
toJson
Convert object to JSON representation- Returns:
- JSON representation
-