Spring Stomp message send and receiptId - spring

What is the right way to configure Spring StompBrokerRelay, to be able to create a simple java client which just publishes a messages, which are acknowledge by the server.
Spring client StompSession is returning Receiptable when sending message from client and it's possible to configure ReceiptTasks, but the receipt is never received from server.

Related

Websocket using Stomp not able to receive subscribe data in client

I am using websocket with spring boot and stomp messaging protocol, where i created a HTML and using javascript event listener code to publish and subscribe the data. I can see publisher data in network tab and i can process the request in java as well. but subscriber data not showing. could any one help on this?

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?

Sending message from Spring Kafka to Angular

Is there a way to send message from Spring Kafka to Angular without using Websocket?
I use Spring as service side, and Angular as Client side.
When, I send a Kafka message from Spring server-side, I just want to transmit this message to Angular based client side.
I used this code in Spring-server to send message:
kafkaTemplate.send(topic, payload);
Actually my question is nearly same of this:
Actually my question is nearly same of this:
Receiving Kafka event on web browser real time
You can use Kafka REST API (proxy), it lets you to call Kafka directly from you client javascript and so you could consume/send events directly.
Have a look: https://github.com/confluentinc/kafka-rest

Spring web services, JMS transport and replay-to

I need to send a soap message to a queue and wait for the response into another.
The correlationId in the second one (the response queue) is the message Id in the first the message send to the request queue.
I'd like to use spring-ws but I am out of ideas. Could you please give me some advice or small example?
You can use spring integration like this example https://github.com/snicoll/scratches/blob/master/jms-request-reply/src/main/java/net/nicoll/scratch/spring/boot/jms/sync/JmsRequestReply.java
Or spring jms to do request-reply http://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html

From a Webapp and with Apache Camel / and using MQ, do you add JMS messages using jsessionid?

I have a web application that will launch a message (say start processing) on the MQ message queue. I have a consumer and the producer configuration defined using the Camel Spring DSL. I want to push a message from a web application and only that session and client should get the response. Could I use the jsessionid and maybe some other random message id to set the message so only that client will get the response?
E.g. Imagine Camel Spring DSL xml configuration:
<route id="webRequestToInRoute">
<to uri="activemq:queue:inbox :::: here I want to getJsessionId() as the message ... name?"/>
</route>
More importantly, what are ways that I can communicate between the browser to the camel rest service to the JMS route, mainly to pull the status?
Web app session publishes message
set JMSReplyTo header on the message to: temp-queue://ORDER.$jSessionId
setup a consumer on temp-queue://ORDER.$jSessionId
send to -> queue://PROCESS.ORDER
On the REST service
Consume from queue://PROCESS.ORDER
Do stuff with message
Publish response to temp-queue://ORDER.$jSessionId
Once there are no longer messages, consumers or producers the broker will automatically delete the temp-queue, so there is no clean-up necassary

Resources