public class OffsetAndMetadata extends Object implements Serializable
Constructor and Description |
---|
OffsetAndMetadata(long offset)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
OffsetAndMetadata(long offset,
String metadata)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
public OffsetAndMetadata(long offset, String metadata)
KafkaConsumer
.offset
- The offset to be committedmetadata
- Non-null metadatapublic OffsetAndMetadata(long offset)
KafkaConsumer
. The metadata
associated with the commit will be empty.offset
- The offset to be committed