- All Implemented Interfaces:
KafkaOpenMetadataEventProducer manages the sending of events on Apache Kafka. This is done through called to the Kafka Producer interface.
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.
Method SummaryModifier and TypeMethodDescription
protected voidGive time for an error to clear.
run()This is the method that provides the behaviour of the thread.
voidSends the supplied event to the topic.
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