Unable to use new MQTT payload converter

I have been trying to use the new mqtt_is_valid converter introduced in HAProxy 2.4, however, I keep getting connection refused error. Tried to look at docs but couldn’t find what’s wrong. Is it the inspect delay or something else?

My configuration is below:

global
  maxconn 240000
  log /dev/log local0
  log /dev/log local1 notice
  chroot /var/lib/haproxy
  stats socket /run/haproxy/admin.sock mode 660 level admin
  stats timeout 30s
  user haproxy
  group haproxy
  daemon

defaults
  log global
  mode tcp
  balance roundrobin
  option tcplog
  option dontlognull
  option dontlog-normal
  option http-server-close
  timeout connect 20s
  timeout client 60s
  timeout server 50s
  timeout http-request 50s
  timeout tunnel 3600s
  timeout http-keep-alive 20s
  timeout queue 60s
  timeout tarpit 60s
  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http

listen haproxy-status
  mode http
  bind vernemq-ha-01:1936
  stats enable
  stats uri /stats
  stats refresh 15s
  stats show-node

frontend vernemq_frontend
  bind :8000
  maxconn 240000
#  tcp-request inspect-delay 2s
#  tcp-request content reject if HTTP
  tcp-request content reject unless { req.payload(0,0),mqtt_is_valid } # connection is successful when I comment this line
  default_backend vernemq

frontend vernemq_http_frontend
  bind :80
  maxconn 5000
  default_backend vernemq_http

backend vernemq
  mode tcp
  fullconn 240000
  option httpchk GET /health
  server verne-0 verne-0:1883 maxconn 60000 check port 8888
  server verne-1 verne-1:1883 maxconn 60000 check port 8888
  server verne-2 verne-2:1883 maxconn 60000 check port 8888
  server verne-3 verne-3:1883 maxconn 60000 check port 8888

backend vernemq_http
  mode http
  option httpchk GET /health
  server verne-0 verne-0:8888 check port 8888
  server verne-1 verne-1:8888 check port 8888
  server verne-2 verne-2:8888 check port 8888
  server verne-3 verne-3:8888 check port 8888

backend bad_backend
  mode http
  errorfile 403 /etc/haproxy/errors/403.http

Logs:

Jun 21 14:44:56 vernemq-ha-01 haproxy[33031]: 10.80.17.197:63673 [21/Jun/2021:14:44:56.346] vernemq_frontend vernemq_frontend/<NOSRV> -1/-1/0 0 PR 1/1/0/0/0 0/0

This may be connected to the issue reported here: