Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ default Optional<String> getKey() {
return Optional.empty();
}

/**
* Return a record id if the record has one associated.
*/
default Optional<byte[]> getRecordId() {
return Optional.empty();
}

/**
* Retrieves the actual data of the record.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ public void ack() {
public void fail() {
this.failFunction.run();
}

@Override
public Optional<byte[]> getRecordId() { return Optional.of(message.getMessageId().toByteArray()); }
}