public interface JCSMPStreamingPublishEventHandler
JCSMPStreamingPublishEventHandler is a callback interface to
asynchronously handle responses from send operations.
By providing an implementation of
JCSMPStreamingPublishEventHandler to Producer, an
application can send messages without waiting for responses (streaming
publishing mode). The response (when applicable) of the send operation is
delivered asynchronously through this callback handler.
| Modifier and Type | Method and Description |
|---|---|
void |
handleError(String messageID,
JCSMPException cause,
long timestamp)
This method is invoked during streaming publishing if there is an error
in reading the response, or if a non-OK response is read.
|
void |
responseReceived(String messageID)
This method is invoked whenever an OK response is received.
|
void handleError(String messageID, JCSMPException cause, long timestamp)
Note: Handler processing should be kept to a minimum because it blocks the thread from which the error originated.
JCSMPErrorResponseException. The subcodes discussed in
JCSMPStreamingPublishCorrelatingEventHandler might be present to provide
further information about why the message was rejected.messageID - The message ID of the message with which the error condition
is associated.cause - The error condition.timestamp - The time of the error given by
System.currentTimeMillis().void responseReceived(String messageID)
When publishing
PERSISTENT and
NON_PERSISTENT messages, the
messageID is passed as an argument to this callback when
an acknowledgement is received.
Note: This method is not invoked for DIRECT messages
because they do not receive acknowledgements.
Copyright 2004-2018 Solace Corporation. All rights reserved.