Hi, While looking through the code/thread dumps I noticed that decompression of compressed payload happens on pulsar-client-io threads Specifically: https://github.com/apache/pulsar/blob/80c5791b87482bee3392308ecef45f455f8de885/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L495-L505 handleMessage runs on the pulsar-client-io thread (used by netty) and consumer.messageReceived() will do decompression of the payload on the netty thread, which is a bad practice in my understanding.
I am not very familiar with client's thread pools, are there any reasons not to movemessageReceived() to internalPinnedExecutor, like consumer.internalPinnedExecutor.submit(() -> { consumer.messageReceived(cmdMessage, headersAndPayload, ClientCnx.this); }); -- Andrey