This property must be set to enable payload compression. Valid values for the payload compression level to be applied to the payload of a message published by a client are 0-9.
Value meanings:
Note: Please ensure that both publishers and consumers are updated to support payload compression before enabling this property. In the case where a publisher compresses the payload and a consumer does not support payload decompression, the untouched compressed message will be received which can lead to potential issues within the consuming application. Therefore, the consumer would either need to update to a newer version of the API or the user would need to handle the decompression on the receiving side in their own application. If a publishing application is able to send a compressed message, brokers currently will discard messages on egress to other protocols such as MQTT, AMQP and HTTP (Kafka too?).
Default: 0 (disabled)
public int PayloadCompressionLevel { get; set; }