Hi bettylim
Welcome to the wolfSSL forums.
Are you using TLS? Which TCP stack are you using? wolfMQTT does not consume much in the way of resources.
Higher QoS increases the number of round trips required, but does not increase memory usage significantly.
The buffer sizes used should correlate with the average data payload size to optimize memory use. For large payloads, it would be optimal to set it to the TCP driver buffer size.
It would be helpful to discuss your specific project in more detail. Feel free to open a support ticket by emailing support@wolfssl.com
Thanks,
Eric - wolfSSL Support