I am trying to connect to a websocket server from a Golang client. The server is listening on a path, like so: host:port/path. The server is expecting a Stomp client to connect and then subscribe to a topic as identified in the stomp headers by “/topic/topic-name”.
I have tried both stompngo and go-stomp libraries to accomplish this task, but neither library seems to support making a connection at a path location on the server.
As an alternative, I used the gorilla websocket package to make a websocket connection and this library happily supports the connection using a path. The issue here is that it is not stomp-compliant, so the challenge once connected is figuring out how to write a message to the stream that triggers the subscription on a server that is expecting stomp clients.
Ideally, I can find a way to make a connection to host:port/path using a stomp-compliant library.
Any help appreciated….
Larry K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.