Class KafkaOpenMetadataTopicConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector
org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicConnector
- All Implemented Interfaces:
Runnable
,AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,OpenMetadataTopic
KafkaOMRSTopicConnector provides a concrete implementation of the OMRSTopicConnector that
uses native Apache Kafka as the event/messaging infrastructure.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector
auditLog
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
ConstructorDescriptionConstructor sets up the default properties for the producer and consumer. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<IncomingEvent>
Look to see if there is one of more new events to process.void
Free up any resources held since the connector is no longer needed.void
Sends the supplied event to the topic.void
start()
Indicates that the connector is completely configured and can begin processing.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicConnector
checkForEvents, getConnectorComponentDescription, registerListener, run, setAuditLog
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
KafkaOpenMetadataTopicConnector
public KafkaOpenMetadataTopicConnector()Constructor sets up the default properties for the producer and consumer. Any properties passed through the connection's additional properties will override these values. For most environments, The caller only needs to provide details of the bootstrap servers as the default properties will support the open metadata workloads.
-
-
Method Details
-
start
Indicates that the connector is completely configured and can begin processing. It creates two threads, one for sending (producer) and the other for receiving events (consumer)- Overrides:
start
in classOpenMetadataTopicConnector
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-
sendEvent
Sends the supplied event to the topic.- Parameters:
event
- object containing the event properties.- Throws:
ConnectorCheckedException
- the connector is not able to communicate with the event bus
-
checkForIncomingEvents
Look to see if there is one of more new events to process.- Overrides:
checkForIncomingEvents
in classOpenMetadataTopicConnector
- Returns:
- a list of received events or null
-
disconnect
Free up any resources held since the connector is no longer needed.- Overrides:
disconnect
in classOpenMetadataTopicConnector
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-