Package org.apache.pulsar.client.impl
Interface SendCallback
-
public interface SendCallback
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCallback(MessageImpl<?> msg, SendCallback scb)used to specify a callback to be invoked on completion of a send operation for individual messages sent in a batch.java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.MessageId>getFuture()MessageImpl<?>getNextMessage()Return next message in chain.SendCallbackgetNextSendCallback()voidsendComplete(java.lang.Exception e)invoked when send operation completes.
-
-
-
Method Detail
-
sendComplete
void sendComplete(java.lang.Exception e)
invoked when send operation completes.- Parameters:
e-
-
addCallback
void addCallback(MessageImpl<?> msg, SendCallback scb)
used to specify a callback to be invoked on completion of a send operation for individual messages sent in a batch. Callbacks for messages in a batch get chained- Parameters:
msg- message sentscb- callback associated with the message
-
getNextSendCallback
SendCallback getNextSendCallback()
- Returns:
- next callback in chain
-
getNextMessage
MessageImpl<?> getNextMessage()
Return next message in chain.- Returns:
- next message in chain
-
getFuture
java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.MessageId> getFuture()
- Returns:
- future associated with callback
-
-