Allow stateful processors only in global config #16653
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative solution to #16349.
Add a different registry for "stateful" processors, processors that would need to be closed. Use this registry only in global configurations, so processors registered in this registry can only be used in global configuration. Using these processors there is not such a problem because these processors are used during all the life of the beat.
Registry for "stateful" processors also include stateless processors.
If we also add the closers in #16349, we could allow the selective use of stateful processors also in dynamic configurations. This would be needed to support processors in modules.
(Any alternative naming proposal for the "stateful" methods is welcome)