djselzlein / spring-websockets-rabbitmq-demo Goto Github PK
View Code? Open in Web Editor NEWDemo project on how to integrate Spring Web Sockets and RabbitMQ
License: MIT License
Demo project on how to integrate Spring Web Sockets and RabbitMQ
License: MIT License
Hi, I'm struggling to find a solution for my installation.
This is the log of spring app:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.6)
2023-05-30 17:53:11.647 INFO 4248 --- [ main] .SpringWebsocketsRabbitmqDemoApplication : Starting SpringWebsocketsRabbitmqDemoApplication using Java 1.8.0_202 on LAPTOPO with PID 4248 (C:\Users\Tobia\git\spring-websockets-rabbitmq-demo\target\classes started by Tobia in C:\Users\Tobia\git\spring-websockets-rabbitmq-demo)
2023-05-30 17:53:11.649 INFO 4248 --- [ main] .SpringWebsocketsRabbitmqDemoApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-30 17:53:12.830 INFO 4248 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2023-05-30 17:53:12.840 INFO 4248 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-05-30 17:53:12.840 INFO 4248 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.60]
2023-05-30 17:53:12.970 INFO 4248 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-05-30 17:53:12.970 INFO 4248 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1279 ms
2023-05-30 17:53:13.350 INFO 4248 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2023-05-30 17:53:13.762 INFO 4248 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2023-05-30 17:53:13.763 INFO 4248 --- [ main] o.s.m.s.s.StompBrokerRelayMessageHandler : Starting...
2023-05-30 17:53:14.677 INFO 4248 --- [ main] o.s.m.s.s.StompBrokerRelayMessageHandler : Starting "system" session, StompBrokerRelay[ReactorNettyTcpClient[reactor.netty.tcp.TcpClientConnect@3cbf1ba4]]
2023-05-30 17:53:15.187 INFO 4248 --- [ main] o.s.m.s.s.StompBrokerRelayMessageHandler : Started.
2023-05-30 17:53:15.199 INFO 4248 --- [ main] .SpringWebsocketsRabbitmqDemoApplication : Started SpringWebsocketsRabbitmqDemoApplication in 3.937 seconds (JVM running for 4.367)
2023-05-30 17:53:26.738 INFO 4248 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-05-30 17:53:26.739 INFO 4248 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-05-30 17:53:26.739 INFO 4248 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
2023-05-30 17:54:13.137 INFO 4248 --- [MessageBroker-8] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 2 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(2)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[1 sessions, ReactorNettyTcpClient[reactor.netty.tcp.TcpClientConnect@3cbf1ba4] (not available), processed CONNECT(1)-CONNECTED(0)-DISCONNECT(0)], inboundChannel[pool size = 12, active threads = 0, queued tasks = 0, completed tasks = 12], outboundChannel[pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 4], sockJsScheduler[pool size = 12, active threads = 1, queued tasks = 1, completed tasks = 9]
And this is the log of js stomp client
Opening Web Socket... [stomp.min.js:8:1895](http://localhost:8080/webjars/stomp-websocket/stomp.min.js)
GET
ws://localhost:8080/websocket-app/286/swn4emo4/websocket
[HTTP/1.1 101 11ms]
Web Socket Opened... [stomp.min.js:8:1895](http://localhost:8080/webjars/stomp-websocket/stomp.min.js)
>>> CONNECT
accept-version:1.1,1.0
heart-beat:10000,10000
� [stomp.min.js:8:1895](http://localhost:8080/webjars/stomp-websocket/stomp.min.js)
<<< ERROR
message:Broker not available.
content-length:0
� [stomp.min.js:8:1895](http://localhost:8080/webjars/stomp-websocket/stomp.min.js)
Whoops! Lost connection to http://localhost:8080/websocket-app
Rabbit MQ is started with stomp plugin on port 61613 and guest/guest as user passw
Many thanks for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.