Rule
Rule is a routing component that consists of a filter and one to five targets. A bus may have a number of rules associated with it. Each event entering a bus is filtered using all the bus rules. Before a rule is triggered, the event is checked against the conditions specified in the filter. If the conditions are met, the rule is triggered and the event is forwarded to all the targets specified in the rule.
Filter
A filter is an expression in jq format.firstName == "Ivan"
. If the filter is empty, the rule is considered triggered and events are forwarded to all targets. If the event cannot be parsed or its body does not satisfy the conditions specified in the filter, the rule is not triggered.
Target
Target is the consumer of an event. Supported targets:
- WebSocket connections connected to the API Gateway API gateway.
- Cloud Functions functions.
- Cloud Logging log groups.
- Data Streams streams.
- Message Queue queues.
- Serverless Containers containers.
- Workflows workflows.
EventRouter supports the At least once
delivery guarantee. If unable either to deliver an event or get a delivery confirmation, EventRouter will be retrying to send the event before the event lifetime expires. The number of retries and the maximum event lifetime are set in the target settings. An event that could not be processed is moved to the dead-letter queue specified by the client.
For optimization purposes, EventRouter allows you to specify event grouping settings for some types of targets. In a target, a jq pattern may be set, to transform events based on it before forwarding them to the target.