Membrane API Gateway returns 400 Bad Request with the detail Error in STOMP client! when the stompClient plugin cannot forward a STOMP connect request to the broker because of an I/O error.
The response contains the status 400 Bad Request, the detail Error in STOMP client!, the problem type https://membrane-api.io/problems/user and a link to this page. Despite the type user and the status 400, the client is not at fault. The error describes a connection problem between the gateway and the STOMP broker.
The stompClient plugin connects Membrane to a STOMP message broker, such as ActiveMQ or RabbitMQ, at the configured host and port (default 61613) and forwards STOMP frames to it. Outbound TLS and connection parameters can be configured on the plugin.
The broker at the configured host and port refuses the connection, the host name cannot be resolved, or the connection attempt times out. Check that the broker is running and that no firewall blocks the port.
With outbound TLS configured, the handshake with the broker failed, for example because the broker's certificate is not trusted or the broker does not speak TLS on that port.
The connection was closed while the request was written to the broker, for example because the broker restarted.
host and port.stompClient, for example the timeout.By default, Membrane runs in development mode and adds details to error responses that help you find the problem. These details may reveal information about your setup. In production, turn them off:
configuration:
production: trueconfiguration: production: true
Add the configuration document to your apis.yaml and separate it from the APIs with ---.
Configuration reference:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.