Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Web Socket Java Client

How to Write a Java based Spring Web Socket (STOMP) Client. As in Spring we have only javascript based client is provided using stompJS but if we need a java client how should we need to achive it?

like image 947
Sathish Kumar k k Avatar asked Sep 16 '14 11:09

Sathish Kumar k k


1 Answers

Spring 4.1 introduces a SockJs Java Client which is quite useful for server to server communication and performance testing. It doesn't come with a Stomp client (this is certainly in the roadmap) but you can check out the tests in the sample app which has already an implementation. Seems this is what you are looking for.

Update 8 Sep 2015:

Spring 4.2 has a STOMP Java client which can be used along with the SockJS Java client. More: https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/htmlsingle/#websocket-stomp-client

like image 200
Sergi Almar Avatar answered Oct 22 '22 14:10

Sergi Almar