本文整理了Java中kafka.message.Message.isNull()
方法的一些代码示例,展示了Message.isNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.isNull()
方法的具体详情如下:
包路径:kafka.message.Message
类名称:Message
方法名:isNull
暂无
代码示例来源:origin: pinterest/secor
if (!messageAndOffset.message().isNull()) {
ByteBuffer payload = messageAndOffset.message().payload();
payloadBytes = new byte[payload.limit()];
代码示例来源:origin: michal-harish/kafka-hadoop-loader
if (message.isNull()) {
value.setSize(0);
} else {
代码示例来源:origin: HomeAdvisor/Kafdrop
private MessageVO createMessage(Message message, MessageDeserializer deserializer)
{
MessageVO vo = new MessageVO();
if (message.hasKey())
{
vo.setKey(ByteUtils.readString(message.key()));
}
if (!message.isNull())
{
final String messageString = deserializer.deserializeMessage(message.payload());
vo.setMessage(messageString);
}
vo.setValid(message.isValid());
vo.setCompressionCodec(message.compressionCodec().name());
vo.setChecksum(message.checksum());
vo.setComputedChecksum(message.computeChecksum());
return vo;
}
内容来源于网络,如有侵权,请联系作者删除!