pl.allegro.tech.hermes.domain.topic.preview.MessagePreview Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-common Show documentation
Show all versions of hermes-common Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.domain.topic.preview;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class MessagePreview {
private final byte[] content;
private final boolean truncated;
@JsonCreator
public MessagePreview(@JsonProperty("content") byte[] content, @JsonProperty("truncated") boolean truncated) {
this.content = content;
this.truncated = truncated;
}
public MessagePreview(byte[] content) {
this(content, false);
}
public byte[] getContent() {
return content;
}
public boolean isTruncated() {
return truncated;
}
}