spring-guides / gs-messaging-stomp-websocket

Using WebSocket to build an interactive web application :: Learn how to the send and receive messages between a browser and the server over a WebSocket

Home Page:http://spring.io/guides/gs/messaging-stomp-websocket/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set property of the broker such like RabbitMQ?

lplpkkk opened this issue · comments

commented

Hello, I just changed the broker setting to enable my RabbitMQ server works.
(I changed the ""enableSimpleBroker" to "enableStompBrokerRelay" so that RabbitMQ can work in my localhost:15672)

I am wondering that what should I do if I want to send a message to another PC in the same LAN rather than sending to my local port?
I guess I might add a java code to set some property with AMQP protocol, but I am not sure how to do that.

thanks for any help or suggestion!

So you have a Web server (Tomcat, Jetty, etc) that exposes a WebSocket endpoint and delegates to RabbitMQ for broadcasting messages. Keep in mind that PCs (clients) are only aware of the WebSocket connection, i.e. they are not connected directly to RabbitMQ. Any client connected to the same server will receive messages. You can also have multiple Web servers all delegating to RabbitMQ for shared messaging/broadcasting.

commented

okay, I know that a single server can serve multiple clients.
I want to know that how to set the port as one of the ConnectionFactory with AMQP in the server side in this project?

still appreciate your response!

I think this is exceeding the scope of his guide. Perhaps posting your queetion on stackoverflow.com would be a better forum to get community feedback.

commented

okay, thanks!