-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 branching modification to matching policy (route branch) #521
Comments
I have this type of feature in mind, but I am not yet clear on how to specify properly it in the YAML configuration. |
Perhaps something like that, which is generic: To apply specific routes routing-policy:
accepted: [ stanzaA ]
discarded: [ stanzaB ] To discard unmatched packet routing-policy:
accepted: [ stanzaA ]
discarded: [ ] And finally, the default routing for backward compatibility with any checks routing-policy:
default: [ stanzaA, stanzaB, .... ] |
The model you describe in the last comment seems to be a good way of approaching the issue, of course assuming that there can (as usual) be multiple paths specified in the routing output for each option. Example:
Question: Would objects that match an "exclude:" statement automatically go to the "discarded:" route path? Are "exclude:" rules considered first, then, before "include:" rules? |
Multiple path is supported as usual.
Exclude and include rules works together with a logical AND. |
Completed but need documentations |
implemented in #719 |
Is your feature request related to a problem? Please describe.
It seems that there could be a better branching function easily implemented in the match/non-matching concept.
Right now, there is a matching function which has "include" and "exclude" criteria. Also, there is a "policy" concept, which says what to do with messages that do not meet the matching criteria, but that policy: concept has a critical flaw - it can only jump to the routes: specified at the end of the statement, which is ALSO where all the matching results are sent after the transformations. This model essentially forces branching behaviors closer to ingestion in order to avoid this inadvertent combining of routing.
Describe the solution you'd like
It seems that instead of a "policy" statement, you could have a "route-unmatched:" statement that would give the ability to fork queries based on their meeting or not meeting the "include:" criteria. It is implicit that anything that meets the "matching: include:" statements will then have the transformations or aggregations or other actions applied to them, and then they can proceed to a next route statement. Adding "route-unmatched:" would allow immediate branching to a different path.
(also: is "exclude:" just another way of saying that the message is unmatched?)
Example of how this path logic has to work today:
Here's the example below of how it could look with a slightly different method:
We get flexibility if this is what things look like - messages are not split, and actions taken on matching messages are not necessarily inserted back into the single pathway. This permits forking on match, but keeping most messages in a single unduplicated stream for lower processing overhead.
Describe alternatives you've considered
It is possible to achieve the same outcomes by creating multiple route destinations, each leading to a specific conclusion. This seems quite wasteful, and means every packet has to be evaluated many times over, and also requires strict include/exclude matching sets as the contexts become deeper.
The text was updated successfully, but these errors were encountered: