Filters help in making smart decisions for message delivery. Filters give sight to the router by analyzing a message. The filter expressions can be true or false. If true, the value gets stored in the output array; otherwise, the program discards it.