public interface AckHandler
Modifier and Type | Method and Description |
---|---|
void |
onAck(java.lang.String nuid,
java.lang.Exception ex)
This method is called when a message has been acknowledged by the STAN
server, or if an error has occurred during the publish operations.
|
default void |
onAck(java.lang.String nuid,
java.lang.String subject,
byte[] data,
java.lang.Exception ex)
New version of onAck that includes the message that failed so that applications can more
easily resend it.
|
void onAck(java.lang.String nuid, java.lang.Exception ex)
NUID
), along with any error that was
encountered.
onAck with a message is now called, with the default behavior of calling this version.
Not deprecated yet to avoid multiple warnings, will deprecate in the future.nuid
- the message NUIDex
- any exception that was encountereddefault void onAck(java.lang.String nuid, java.lang.String subject, byte[] data, java.lang.Exception ex)
nuid
- the message NUIDsubject
- the subject the failed message was sent todata
- the data passed into publish, this is the same data passed to publish
if the byte array is reused in application code, it will be corrupted here
in the case where no ack handler is passed to publish the data will be null
but since there is no ack handler it won't matter except to allow garbage collection.ex
- any exception that was encountered