0
votes

I have a process that runs in California that wants to talk to a process in New York, using Stomp over Websockets.

Also note that my process is not a web app, but I implemented a stomp over websocket client in C++, in order to connect things up to my backend. Maybe this was or wasn't a good idea. So, I want my client to talk to the server and subscribe, where their client pushed messages.

I was implementing my own server when I saw that ApacheMQ supported Stomp over Websockets. So, I started reading the docs.

It says with the last line under 'configuration' at http://activemq.apache.org/websockets :

One thing worth noting is that web sockets (just as Ajax) implements ? > the same origin policy, so you can access only brokers running on the > same host as the web application running the client.

it says it again in several related searches such as http://sensatic.net/activemq/activemq-54-stomp-over-web-sockets.html

Is this a limitation of the server or the web client?

With that limitation, if I understand right, the server is not going to accept websocket connections from a client, of any kind, that is not on the same machine?

I am not sure I see the point of that...

If that is indeed its meaning, then how do I get around it in order to implement my scenario?

1

1 Answers

0
votes

I've not found that bit of documentation you are referring to but from what I know of the STOMP implementation on the broker this seems incorrect. There shouldn't be any limit to the transport connector accepting connect requests from an outside host by default and I don't think the browser treats the websocket requests the same as it does other things like an Ajax case in terms of the same origin policy.

This probably a case that is best checked by actually trying it to see if it works, I've connected just fine from outside the same host using AMQP over websockets on ActiveMQ so I'd guess the STOMP stack should also work fine.