- Add a flag to our module metadata to indicate that we want to handle events
- Include a new method that will receive
Setting up a module to handle events
To set up a module to handle events, we need to add a new flag to the module metadata calledeventAware and set it to true.
handle_event function. Event-aware modules receive the same injected runtime parameters as inference modules, so you typically read the raw event data from pipeline_context.context.
document is hydrated for you. Otherwise, use pipeline_context.context for the event metadata you need.