Extracting and Validating MQTT Connection Parameters from CONNECT Packet in HAProxy WebSocket Setup


I have a setup in which I use HAProxy to load balance MQTT requests sent via web sockets. I am currently seeking guidance on how to effectively extract and validate MQTT connection parameters (such as username and password) from the CONNECT packet.

I would greatly appreciate any advice or insights you can provide regarding this matter. Thank you.