FILTER_JEXL_SCHEMA_PROTO_CLASSas configured in the environment variables.
MessageFilteriterates over the input List of events. For each event, the Protobuf Class as specified by the environment variable
FILTER_JEXL_SCHEMA_PROTO_CLASS, converts the key/message of the event from raw byte array to a POJO (Plain Old Java Object), which contains getters for accessing various fields of the event data.
JEXLContextis created to link the key/message proto reference in the JEXL expression with the POJO object generated earlier. JEXL engine converts
JEXLExpressionobject and replaces all occurrences of references in the string by the generated POJO object.
JEXLExceptionis thrown if the filter expression is invalid.
JEXLExpressionis then evaluated for each of these parsed events. The messages for which the
true, are added to the output List of messages and returned by the Filter. The rest of the messages are discarded by the Filter