I am using webstomp to comunicate with my message broker (In this case rabbit).
When I want to write a message I do the following:
import * as SockJS from 'sockjs-client';
let client = Stomp.over(new SockJS(serverAddress));
client.connect(user, pass, onConnect, onError);
client.send('/exchange/amq.direct/test', {test: 'one', test2: 'two'});
This message is received correctly by Rabbit but I would like to have a way to confirm that more than viasually. Something similar to:
client.send('/exchange/amq.direct/test', {test: 'one', test2: 'two'})
.then(() => {console.log('Message received correctly')})
.catch((err) => {console.log('Imposible send the message')})
Is there a way to do this?