//tag::ref-doc[]
= Filter Processor

Filter processor enables an application to examine the incoming payload and then applies a predicate against it which decides if the record needs to be continued.
For example, if the incoming payload is of type `String` and you want to filter out anything that has less than five characters, you can run the filter processor as below.

`java -jar filter-processor-kafka-<version>.jar --filter.function.expression=payload.length() > 4`

Change kafka to rabbit if you want to run it against RabbitMQ.

=== Payload

You can pass any type as payload and then apply SpEL expressions against it to filter.
If the incoming type is `byte[]` and the content type is set to `text/plain` or `application/json`, then the application converts the `byte[]` into `String`.

== Options

//tag::configuration-properties[]
$$filter.function.expression$$:: $$Boolean SpEL expression to apply against request message to filter.$$ *($$Expression$$, default: `$$<none>$$`)*
//end::configuration-properties[]

//end::ref-doc[]
