31. A method, comprising: creating and storing one or more message classification rules and a mapping of message classification values to network-level QoS values, wherein each of the one or more message classification rules specifies one or more application-level attributes and one of the message classification values; intercepting an application-layer message encapsulated in a collective payload portion of two or more data packets according to an application-layer protocol, wherein the application-layer message is received at a network infrastructure element comprising a plurality of network interfaces that are coupled to a data network for receiving one or more packets therefrom and sending one or more packets thereto, the one or more processors, and a switching system coupled to the one or more processors and packet forwarding logic, wherein the switching system and packet forwarding logic are configured to receive packets on a first network interface, determine a second network interface on which to send the packets, and to send the packets on the second network interface; wherein the application-layer message communicates application-level information between applications, and wherein the application-level information comprises application-level attributes that are contained in a body of the application-layer message; extracting and assembling the application-layer message from the collective payload portion based at least in part on the application protocol; matching one or more application-level attributes from the body of the extracted and assembled application-layer message to the one or more message classification rules; determining a message classification value of the extracted and assembled application-layer message based at least in part on the matching; selecting one of the network-level QoS values using the mapping and based at least in part on the determined message classification value; marking a network-level header of the at least one of the two or more data packets based at least in part on the selected network-level QoS value; wherein the method is performed by one or more computing devices.
31. A method, comprising: creating and storing one or more message classification rules and a mapping of message classification values to network-level QoS values, wherein each of the one or more message classification rules specifies one or more application-level attributes and one of the message classification values; intercepting an application-layer message encapsulated in a collective payload portion of two or more data packets according to an application-layer protocol, wherein the application-layer message is received at a network infrastructure element comprising a plurality of network interfaces that are coupled to a data network for receiving one or more packets therefrom and sending one or more packets thereto, the one or more processors, and a switching system coupled to the one or more processors and packet forwarding logic, wherein the switching system and packet forwarding logic are configured to receive packets on a first network interface, determine a second network interface on which to send the packets, and to send the packets on the second network interface; wherein the application-layer message communicates application-level information between applications, and wherein the application-level information comprises application-level attributes that are contained in a body of the application-layer message; extracting and assembling the application-layer message from the collective payload portion based at least in part on the application protocol; matching one or more application-level attributes from the body of the extracted and assembled application-layer message to the one or more message classification rules; determining a message classification value of the extracted and assembled application-layer message based at least in part on the matching; selecting one of the network-level QoS values using the mapping and based at least in part on the determined message classification value; marking a network-level header of the at least one of the two or more data packets based at least in part on the selected network-level QoS value; wherein the method is performed by one or more computing devices. 40. The method of claim 31 , wherein the application-layer message is a first application-layer message, further comprising: forwarding the first application-layer message to an endpoint; intercepting a second application-layer message from the endpoint; determining that the second application-layer message is associated with the first application-layer message; marking one or more data packets containing the second application-layer message with the same selected QoS value that was used to mark the at least one of the two or more data packets containing the first application-layer message; and forwarding the second application-layer message to a next hop, wherein the forwarding is prioritized based at least in part on writing the second application-layer message to one of the virtual connections that is associated with the selected QoS value.