1. A method, comprising: obtaining, over time, by a messaging service provider that facilitates the transmission of messages between message producers and message consumers, respective data collections representing a plurality of messaging states, wherein each messaging state data collection includes a messaging load of messages being received at the message service provider, a level of compression of the received messages by the messaging service provider at the messaging load, and one or more usage levels of a plurality of different resources being consumed as a function of the messaging load and messaging compression level; storing the obtained messaging state data collections in a storage accessible by the messaging service provider; estimating, from the obtained messaging state data collections, resource usage levels of the plurality of resources at a plurality of different messaging compression levels based on a common messaging load, wherein each resource of the plurality of resources is associated with a respective cost function for usage of the resource; selecting, based on the estimated resource usage levels and the respective cost functions, a particular messaging compression level from the plurality of different messaging compression levels to achieve a desired overall cost for use of the plurality of resources; and compressing copies of messages received at the messaging service provider under the common messaging load at the particular messaging compression level.