Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Add Kafka as an event source #1911

Closed
wants to merge 64 commits into from

Conversation

rickfish
Copy link
Contributor

@rickfish rickfish commented Oct 5, 2020

Allow messages to be published to a Kafka topic. That Kafka topic will be used as a source for generating Conductor events to start workflows, fail tasks and complete tasks. The original implementation was taken from PR #672 which was never completed and code was added to handle secure topics, error processing and multiple consumers per topic.

Documentation on how to use it is in docs/docs/kafkaeventsource.md.

@codecov
Copy link

codecov bot commented Oct 5, 2020

Codecov Report

Merging #1911 (aa16061) into dev (4c417be) will decrease coverage by 0.77%.
The diff coverage is 16.82%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1911      +/-   ##
============================================
- Coverage     65.76%   64.98%   -0.78%     
- Complexity     4091     4113      +22     
============================================
  Files           310      316       +6     
  Lines         19270    19574     +304     
  Branches       1758     1792      +34     
============================================
+ Hits          12673    12721      +48     
- Misses         5730     5980     +250     
- Partials        867      873       +6     
Impacted Files Coverage Δ Complexity Δ
...va/com/netflix/conductor/contribs/KafkaModule.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...lix/conductor/contribs/kafka/KafkaLoginModule.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...tor/core/events/kafka/KafkaEventQueueProvider.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...m/netflix/conductor/core/config/Configuration.java 44.26% <0.00%> (-24.97%) 22.00 <0.00> (ø)
...nductor/core/events/queue/MessageEventFailure.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...x/conductor/core/events/queue/ObservableQueue.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...tor/contribs/queue/kafka/KafkaObservableQueue.java 16.66% <16.66%> (ø) 12.00 <12.00> (?)
...tor/core/events/queue/EventProcessingFailures.java 80.00% <80.00%> (ø) 7.00 <7.00> (?)
...ix/conductor/core/events/SimpleEventProcessor.java 70.21% <100.00%> (+1.09%) 29.00 <3.00> (+2.00)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c417be...aa16061. Read the comment docs.

@coveralls
Copy link

coveralls commented Oct 5, 2020

@rickfish
Copy link
Contributor Author

rickfish commented Oct 5, 2020

Note that one test failed that has nothing to do with my changes: com.netflix.conductor.test.integration.ExternalPayloadStorageSpec. Not sure what to do about that.

@rickfish
Copy link
Contributor Author

rickfish commented Dec 8, 2020

@aravindanr somehow I clicked on something that got rid of your question about the KafkaLoginModule class. Sorry, not sure what happened.

The KafkaLoginModule class can be referenced in a JAAS configuration file to allow adding JAAS security for access to the Kafka topic. Please see example files under src/main/resources in contribs. The 'kafka.default.jaas.config.file' or 'kafka.events.jaas.config.file' property can be specified that will point to the location of the JAAS config file and that JAAS config file can include a reference to the KafkaLoginModule class which will allow for secure access to the topic. I don't know of any other way to provide secure access although i have only used Kafka at my current employer and that is the way they require that security be done for Kafka.

If you look at the init() method of KafkaObservableQueue you will see the reference to config.getKafkaEventsJaasConfigFile(). If found it will set the java.security.auth.login.config system property.

Fishman and others added 20 commits December 9, 2020 10:03
@github-actions
Copy link
Contributor

This PR is stale, because it has been open for 45 days with no activity. Remove the stale label or comment, or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 17, 2021
@github-actions
Copy link
Contributor

This PR was closed, because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants