-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] KafkaOpenMetadataTopicConnector requires both producer and consumer config #7409
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
I think this one should be pursued ... |
The aim stated above is to minimize the administration effort. In addition, there is potentially a runtime performance improvement if we can avoid starting a producer or consumer unnecessarily. Implementing this fix needs some thought on when the information is supplied that determines whether the Kafka topic connector should start either the producer or the consumer or both. The Kafka topic connector is just one implementation of the open metadata topic connector. Changes to the main runtime code need to work for other event bus technology too. In general, we would expect configuration for topics to occur:
Most of the helper methods that configure topics in the configuration document use the event bus config to provide default values for the open metadata topic connector in use. Since this is used in multiple places (and not at runtime), it needs information for both the producer and the consumer. The code that creates the open metadata topic connection always knows whether it is sending/receiving events (or both). Therefore is should be possible to pass an architected configuration property that is part of the Open Metadata Topic Connector interface that can be interpreted as appropriate by each implementation. This value would be set by the consuming code that knows which direction events are flowing. If the value is not set then it is assumed that events are flowing in both directions. |
Names for the new configuration property that any implementation of the OpenMetadataTopicConnector can choose to implement.
These values are found in the OpenMetadataTopicProvider. The KafkaOpenMetadataTopicProvider extends it recognized configuration properties:
The kafka implementation of the OpenMetadataTopicConnector considers the event direction when checking if the brokers are up (does it look in the producer and/or consumer properties for the broker addresses?) and when starting the producer and consumer threads. The configuration helper classes:
The startup logic for the access services sets up the event direction appropriately in the connection when it is about the create the connector (and knows whether it is an inTopic or OutTopic and whether it is for the client or server side. This required a small change to the multi-tenant support because Data Engine OMAS is passing its InTopic connection in the parameter for the outTopic. |
Existing/related issue?
odpi/egeria-connector-integration-lineage-event-driven-sample#42
Current Behavior
Whenever a connector is configured and a configuration for the producer and/or consumer is not passed, default values will be used as described here: https://egeria-project.org/connectors/resource/kafka-open-metadata-topic-connector/?h=kafka+op#default-properties-for-the-producer-and-consumer
If the connector is only used for reading and not for writing, a producer is gratuitous. But unless you configure both the consumer and the producer the connector will not start It checks the availability of the Kafka brokers for the consumer and the producer and if the producer is not configured it takes
localhost:9092
as default. Unless you have a local Kafka cluster the startup will fail.Expected Behavior
There should be a configuration to tell the connector if it is for reading, writing or both. Depending on this configuration the availability of the Kafka broker(s) should only be checked for the consumer and/or producer config.
Steps To Reproduce
I used the
SampleLineageEventReceiverIntegrationConnector
and configured only a consumer and not a producer for the embeddedOpenMetadataTopicConnector
.Environment
Any Further Information?
Workaround is to configure both a consumer and a producer with the same Kafka properties.
The text was updated successfully, but these errors were encountered: