public class MessageParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MessageParser.MessageProcessor
Definition of an interface to process a raw Pulsar entry payload.
|
| Constructor and Description |
|---|
MessageParser() |
| Modifier and Type | Method and Description |
|---|---|
static void |
parseMessage(TopicName topicName,
long ledgerId,
long entryId,
io.netty.buffer.ByteBuf headersAndPayload,
MessageParser.MessageProcessor processor,
int maxMessageSize)
Parse a raw Pulsar entry payload and extract all the individual message that may be included in the batch.
|
static io.netty.buffer.ByteBuf |
uncompressPayloadIfNeeded(TopicName topic,
PulsarApi.MessageMetadata msgMetadata,
io.netty.buffer.ByteBuf payload,
long ledgerId,
long entryId,
int maxMessageSize) |
static boolean |
verifyChecksum(TopicName topic,
io.netty.buffer.ByteBuf headersAndPayload,
long ledgerId,
long entryId) |
public static void parseMessage(TopicName topicName, long ledgerId, long entryId, io.netty.buffer.ByteBuf headersAndPayload, MessageParser.MessageProcessor processor, int maxMessageSize) throws IOException
MessageParser.MessageProcessor will be invoked for each individual message.IOExceptionpublic static boolean verifyChecksum(TopicName topic, io.netty.buffer.ByteBuf headersAndPayload, long ledgerId, long entryId)
public static io.netty.buffer.ByteBuf uncompressPayloadIfNeeded(TopicName topic, PulsarApi.MessageMetadata msgMetadata, io.netty.buffer.ByteBuf payload, long ledgerId, long entryId, int maxMessageSize)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.