| Constructor and Description |
|---|
RawReaderImpl(PulsarClientImpl client,
String topic,
String subscription,
CompletableFuture<org.apache.pulsar.client.api.Consumer<byte[]>> consumerFuture) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
acknowledgeCumulativeAsync(org.apache.pulsar.client.api.MessageId messageId,
Map<String,Long> properties)
Acknowledge all messages as read up until messageId.
|
CompletableFuture<Void> |
closeAsync()
Close the raw reader.
|
CompletableFuture<org.apache.pulsar.client.api.MessageId> |
getLastMessageIdAsync()
Get the last message id available immediately available for reading.
|
String |
getTopic()
Get the topic for the reader.
|
CompletableFuture<Boolean> |
hasMessageAvailableAsync()
Check if there is any message available to read.
|
CompletableFuture<RawMessage> |
readNextAsync()
Read the next raw message for the topic.
|
CompletableFuture<Void> |
seekAsync(org.apache.pulsar.client.api.MessageId messageId)
Seek to a location in the topic.
|
String |
toString() |
public RawReaderImpl(PulsarClientImpl client, String topic, String subscription, CompletableFuture<org.apache.pulsar.client.api.Consumer<byte[]>> consumerFuture)
public String getTopic()
RawReaderpublic CompletableFuture<Boolean> hasMessageAvailableAsync()
RawReaderhasMessageAvailableAsync in interface RawReaderpublic CompletableFuture<Void> seekAsync(org.apache.pulsar.client.api.MessageId messageId)
RawReaderpublic CompletableFuture<RawMessage> readNextAsync()
RawReaderreadNextAsync in interface RawReaderpublic CompletableFuture<Void> acknowledgeCumulativeAsync(org.apache.pulsar.client.api.MessageId messageId, Map<String,Long> properties)
RawReaderacknowledgeCumulativeAsync in interface RawReadermessageId - to cumulatively acknowledge toproperties - a map of properties which will be stored with the acknowledgementpublic CompletableFuture<Void> closeAsync()
RawReadercloseAsync in interface RawReaderpublic CompletableFuture<org.apache.pulsar.client.api.MessageId> getLastMessageIdAsync()
RawReadergetLastMessageIdAsync in interface RawReaderCopyright © 2017–2022 Apache Software Foundation. All rights reserved.