Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing getSchemaVersion in the client by making it public. #3744

Merged
merged 3 commits into from
Mar 4, 2019
Merged
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 @@ -180,4 +180,11 @@ public interface Message<T> {
* @return message redelivery count
*/
int getRedeliveryCount();

/**
* Get schema version of the message.
* @since 2.4.0
* @return Schema version of the message if the message is produced with schema otherwise null.
*/
byte[] getSchemaVersion();
}
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ public byte[] getData() {
}
}

private byte[] getSchemaVersion() {
@Override
public byte[] getSchemaVersion() {
if (msgMetadataBuilder.hasSchemaVersion()) {
return msgMetadataBuilder.getSchemaVersion().toByteArray();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public int getRedeliveryCount() {
return msg.getRedeliveryCount();
}

@Override
public byte[] getSchemaVersion() {
return msg.getSchemaVersion();
}

public Message<T> getMessage() {
return msg;
}
Expand Down