Spring boot + Spring Integration Websocket adapter + Tibco JMS Server - spring-boot

I am working to build an application (Server side) which should pick message from tibco jms queue and then post that to a url at which the Client (written in angular js) will listen, and also from client when some actions are taken then the server should listen to those actions and perform respective actions.
I can read from tibco jms queue and can place it to a spring integration channel.
My question here is that, can this be build using spring integration websocket adaptors (inbound & outbound) ? If yes then can someone help me with some references for sending to the client and receiving from the client adaptor configurations ?

All the info about Spring Integration Websocket module is in the Reference Manual.
You also can take a look to a couple samples:
Simple plain Websockets
Chat based on STOMP protocol

Related

Building realtime messaging app with websockets in spring boot

I want to build a messaging backend service (similar to whatsapp) using spring boot and websockets.
I have look online at the examples of spring boot websockets.
I see how I would send a message to the server from client 1 using the #MessageMapping annotation.
However assuming client 2 (recipient of the message) is also connected to the server with websockets how would I send a message to them.
I have seen the sendToUser annotation however it seems to me that that sends the message to client 1 (the sender of the message).
Is there a map of client ids to websocket sessions or something so that if I know the message should go to (client 2). I can gethis active websocket session and then send him the message?

Is there a way to use spring message brokers without Stompendpoints?

We have a use case to create websocket server. Mobile clients will connect to this websocket server. However mobile clients doesn't support stomp.
We would like to create a Java websocket server. spring does support websockets but it's heavily coupled with STOMP. we like to use Spring message broker concept here but because of Stomp, we are struck now. Is there anyway to overcome this and enable Spring websocket without STOMP but with Spring message broker concept?

Example of RabbitMQ with RPC in Spring Integration

After make a search about different ways to implement it, im stuck.
What im looking for is to realize this example (https://www.rabbitmq.com/tutorials/tutorial-six-spring-amqp.html) with Spring Integration.
I had found interesting post as this (Spring integration with Rabbit AMQP for "Client Sends Message -> Server Receives & returns msg on return queue --> Client get correlated msg") but didn't help me with what i need.
My case mill be a system where a client call the "convertSendAndReceive" method and a server (basede on Spring Integration) will response.
Thanks
According to your explanation it sounds like Outbound Gateway on the Client side and Inbound Gateway on the Server side pair is what you need.
Spring Integration AMQP support provides those implementations for you with built-in correlation functionality: https://docs.spring.io/spring-integration/docs/5.0.0.RELEASE/reference/html/amqp.html

Spring 4 websocket + stomp + rabbitmq and clustering

I am going through Spring 4 websocket + stomp + rabbitmq(RabbitMQ-Web-Stomp plugin) architecture and I have a question about clustering. As per my understanding here Spring MVC act as a gateway for STOMP requests. If we cluster the application instance with spring web socket configuration will it create any confusion? For an example will it open multiple listeners and how will in such a case this architecture behave?
In this scenario, you would need to use load balancing and a message broker. I used HAProxy to load balance 4 Spring MVC instances (websocket) running on 4 tomcat servers. Also configure rabbit mq as a broker. From client code connect to the single HAProxy url.
If you don't use the message broker, then the websocket client subscriptions will be maintained in the app/ web server's (tomcat) JVM and in case one instance goes down, all the subscriptions on that would be lost.

Stomp + Spring + ZeroMQ for real-time

I need to implement a real-time scenario via web sockets and ZeroMQ queue.
SockJS with Stomp in the client side
Spring MVC / Integration with #EnableWebSocketMessageBroker
Remote messaging queue with ZeroMQ
At this moement, I could connect client and Spring via web sockets but I need to add the magic of remote queues.
ZeroMQ is available from 2 remote URLs (one for publishing and another one for subscribing).
My question is: How can I implement ZeroMQ in order to stay listening subscribed URL or the publishing URL?
Additionally, this type of functionality is conceptually similar to Spring Integration Outbound Gateways which stay listening for the response. Is it possible to implement ZeroMQ via Spring integration?
Thank you
We have an open JIRA issue to add ZeroMQ support to Spring Integration.
But nothing is implemented yet; contributions are welcome!.

Resources