Skip to content
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

MINOR: feat(event-subscriptions): event consumer extension #19591

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sushi30
Copy link
Contributor

@sushi30 sushi30 commented Jan 29, 2025

Introducing Dependency Injection for Quartz Jobs

Quartz jobs might require different dependencies to function. These dependencies are handled via the CustomJobFactory for OpenMetadata applications.

While this is convient as it allows to share state from the running app to the jobs which are stateless, it couples all applications implementing the [AbstractNativeApplication](https://github.com/open-metadata/OpenMetadata/pull/19591) to the dependencies.

The solution in this PR uses a simple DIContainer class that can register arbitrary dependencies. The dependencies can be restricted based on some policy at a later time. Adding a new dependency does not require changing any of the implementing classes, and each application can use only the dependencies it requires.

Changes

  • implemented DI for event consumers
  • added custom config for event consumers
  • initialize the event scheduler along with application
  • added workflow custom type

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

- implemented DI for event consumers
- added custom config for event consumers
- initialize the event scheduler along with application
- added workflow custom type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingestion safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant