| Package | Description |
|---|---|
| org.apache.pulsar.client.api |
Pulsar Client API.
|
| Modifier and Type | Method and Description |
|---|---|
MessagePayload |
MessagePayloadFactory.wrap(byte[] bytes)
Create a payload whose underlying buffer refers to a byte array.
|
MessagePayload |
MessagePayloadFactory.wrap(ByteBuffer buffer)
Create a payload whose underlying buffer refers to a NIO buffer.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Message<T> |
MessagePayloadContext.asSingleMessage(MessagePayload payload,
Schema<T> schema)
Convert the given payload to a single message if the entry is not a batch.
|
<T> Message<T> |
MessagePayloadContext.getMessageAt(int index,
int numMessages,
MessagePayload payload,
boolean containMetadata,
Schema<T> schema)
Get the internal single message with a specific index from a payload if the payload is a batch.
|
<T> void |
MessagePayloadProcessor.process(MessagePayload payload,
MessagePayloadContext context,
Schema<T> schema,
Consumer<Message<T>> messageConsumer)
Process the message payload.
|
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.