The Skip Records policy ensures that only valid and relevant records continue through the policy execution chain. If the record is skipped, it is dropped from the message and not forwarded to the client or the cluster.
Skip Records
Related Documentation
Incompatible with
on-prem
Tags
Related Resources
Use cases
Common use cases for the Skip Record policy:
|
Use case |
Description |
|---|---|
| Example: Skip records with a specific name pattern | Identify records with a specific suffix and skip forwarding them. |
| Tutorial: Filter Kafka records by classification headers | Filter out internal logs for users who aren’t on a specific team. |
How it works
This policy runs in the consume phase.
- Event Gateway consumes messages from a Kafka broker.
- Event Gateway checks records against a pattern.
- If the record matches a defined pattern, it does not forward the message.
- If the record doesn’t match the pattern, it applies further policies in the chain.
sequenceDiagram autonumber participant broker as Event broker participant egw as Event Gateway participant client as Client broker->>egw: consume message egw->>egw: check message validity alt If message matches
name pattern egw--xclient: skip passing to client else If message doesn't match
name pattern egw ->> egw: apply other policies egw->>client: pass to client end
Nested policies
This policy can be applied directly to the virtual cluster, or be nested within a Schema Validation policy. See the policy nesting example to learn how to apply a Skip Records policy to a parent.
Nested policies are sorted into an index. You can re-order nested policies within the parent policy by adjusting this index. See the reference for nested policies for more detail.