public class MessageParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MessageParser.MessageProcessor |
| 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)
Parse a raw Pulsar entry payload and extract all the individual message that may be included in the batch.
|
static void |
receiveIndividualMessagesFromBatch(String topic,
PulsarApi.MessageMetadata msgMetadata,
io.netty.buffer.ByteBuf uncompressedPayload,
PulsarApi.MessageIdData messageId,
ClientCnx cnx,
int partitionIndex,
MessageParser.MessageProcessor processor) |
static io.netty.buffer.ByteBuf |
uncompressPayloadIfNeeded(PulsarApi.MessageIdData messageId,
PulsarApi.MessageMetadata msgMetadata,
io.netty.buffer.ByteBuf payload,
String topic,
String subscription) |
static boolean |
verifyChecksum(io.netty.buffer.ByteBuf headersAndPayload,
PulsarApi.MessageIdData messageId,
String topic,
String subscription) |
public static void parseMessage(TopicName topicName, long ledgerId, long entryId, io.netty.buffer.ByteBuf headersAndPayload, MessageParser.MessageProcessor processor) throws IOException
MessageParser.MessageProcessor will be invoked for each individual message.IOExceptionpublic static boolean verifyChecksum(io.netty.buffer.ByteBuf headersAndPayload,
PulsarApi.MessageIdData messageId,
String topic,
String subscription)
public static io.netty.buffer.ByteBuf uncompressPayloadIfNeeded(PulsarApi.MessageIdData messageId, PulsarApi.MessageMetadata msgMetadata, io.netty.buffer.ByteBuf payload, String topic, String subscription)
public static void receiveIndividualMessagesFromBatch(String topic, PulsarApi.MessageMetadata msgMetadata, io.netty.buffer.ByteBuf uncompressedPayload, PulsarApi.MessageIdData messageId, ClientCnx cnx, int partitionIndex, MessageParser.MessageProcessor processor)
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.