1. A method of a device for filtering messages routing across a network, the method comprising: extracting, by a filter configured on a device, a plurality of message components from messages received via a network, the plurality of message components identified as having at least a field name in common, including a first field name; creating, by a learning engine configured on the device, a list of data types for values of the first field name, the list comprising one or more data types of a value of the first field name identified for each of the plurality of message components; and determining, by the learning engine, a most restrictive data type from the list of data types for the values of the first field name of the plurality of message components.