- All Implemented Interfaces:
Kafka is not always running. When this occurs, the call to publish events hangs and this is disruptive to the rest of the server. So the role of this class is to manage the sending of events in a separate thread and manage the logging of errors to alert the operations team that Kafka needs restarting.
runpublic void run()This is the method that provides the behaviour of the thread.
sendEventpublic void sendEvent
(String event)Sends the supplied event to the topic.
event- OMRSEvent object containing the event properties.
recoverAfterErrorprotected void recoverAfterError()Give time for an error to clear.
safeCloseProducerpublic void safeCloseProducer()Normal shutdown