TCP and HTTP Connections - TCP got considered as HTTP and throws Handshake error

I’m using http and tcp mode in single haproxy. For HTTP I’m routing based on acl with domain names according to the matched subpaths it’ll route the traffic to backend, I tried with seperate frontend for mode http and tcp, the tcp connections were getting as http inside haproxy. When I tried to provide only tcp mode it was working but when I tend to use both tcp and http, all requests were made as http requests. I tried using docker compose deployment for tcp, but that ends in vain. Please help me resolve this issue. attached the file contents:
My Haproxy version is 2.8

Try using
mode http for bind 443 and bind 80 and mode tcp for bind :5671 in the single frontend like this

bind :80
bind :443 ssl crt /etc/haproxy/certs/example.com.pem crt /etc/haproxy/certs/dev.example.com.pem crt /etc/haproxy/certs/hrms.example.com.pem
mode http
mode tcp
bind :5671 ssl crt /etc/haproxy/certs/dev.example.com.pem

I need to make rabbitmq connection on port 5671 with TLS, that is the goal

Please do not tag me. This is a community, not a private support channel.

If you have a urgent issue in commercial application, reach out to haproxy.com for commercial support.

Sorry for tagging you, I saw for most you’ve reached out and helped that’s why I tagged you!

Been struck on this for almost a week and tried documentation steps and blogs, didn’t got fix.

Any leads on this will greatly help!