JCSMPStreamingPublishCorrelatingEventHandler
instead.
MessageIDs used to identify published messages by the interface
can changed between publish and acknowledgement
in the event of a DR failover.
Therefore, it is recommended that applications use its extension
JCSMPStreamingPublishCorrelatingEventHandler
instead.
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, however in the event
of a DR failover the messageID may have changed and so cannot be used.
@Deprecated public interface JCSMPStreamingPublishEventHandler
Modifier and Type | Method and Description |
---|---|
void |
handleError(String messageID,
JCSMPException cause,
long timestamp)
Deprecated.
Use
JCSMPStreamingPublishCorrelatingEventHandler instead.
This method is invoked during streaming publishing if there is an error
in reading the response, or if a non-OK response is read.
Note: Handler processing should be kept to a minimum because it blocks the thread from which the error originated. Error responses from the applianceIf an error response is available, it is represented as aJCSMPErrorResponseException . The subcodes discussed in
JCSMPStreamingPublishCorrelatingEventHandler might be present to provide
further information about why the message was rejected. |
void |
responseReceived(String messageID)
Deprecated.
Use
JCSMPStreamingPublishCorrelatingEventHandler instead.
This method is invoked whenever an OK response is received.
When publishing
Note: This method is not invoked for |
void handleError(String messageID, JCSMPException cause, long timestamp)
JCSMPStreamingPublishCorrelatingEventHandler
instead.
This method is invoked during streaming publishing if there is an error
in reading the response, or if a non-OK response is read.
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)
JCSMPStreamingPublishCorrelatingEventHandler
instead.
This method is invoked whenever an OK response is received.
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-2024 Solace Corporation. All rights reserved.