When publishing to a topic via the COAP protocol, the client ID in the query parameters (if provided) is ignored and a random client ID is generated instead. According to the documentation (CoAP Gateway | EMQX 5.0 Documentation) this is not the expected behaviour. The retain query parameter does work, so the query string is being parsed correctly up to some point.
Tested on a EMQX 5.1.1 docker instance running on a Ubuntu host.
Please advise on how to extract this query parameter from COAP messages.