Class PublishResultHandler
java.lang.Object
org.apache.beam.sdk.io.solace.broker.PublishResultHandler
- All Implemented Interfaces:
JCSMPStreamingPublishCorrelatingEventHandler
,JCSMPStreamingPublishEventHandler
public final class PublishResultHandler
extends Object
implements JCSMPStreamingPublishCorrelatingEventHandler
This class is required to handle callbacks from Solace, to find out if messages were actually
published or there were any kind of error.
This class is also used to calculate the latency of the publication. The correlation key contains the original timestamp of when the message was sent from the pipeline to Solace. The comparison of that value with the clock now, using a monotonic clock, is understood as the latency of the publication
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleErrorEx
(Object key, JCSMPException cause, long timestamp) void
responseReceivedEx
(Object key) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.solacesystems.jcsmp.JCSMPStreamingPublishCorrelatingEventHandler
handleError, responseReceived
-
Constructor Details
-
PublishResultHandler
-
-
Method Details
-
handleErrorEx
- Specified by:
handleErrorEx
in interfaceJCSMPStreamingPublishCorrelatingEventHandler
-
responseReceivedEx
- Specified by:
responseReceivedEx
in interfaceJCSMPStreamingPublishCorrelatingEventHandler
-