I am trying to send message from StompJS to MQTT broker. So far I am able to connect to the broker. However, when I try to send a message using following command
stompClient.publish({
destination: `/test`,
binaryBody: data,
headers: {
contentType: 'application/octet-stream',
})
It gives me error "Unknown destination" on the onStompError callback. And they payload has no destination property.
However If I submit like below. Then it automatically adds makes the destination as /queue/test and sends successfully, even though its not the correct destination at all.
stompClient.publish({
destination: `test`,
binaryBody: data,
headers: {
contentType: 'application/octet-stream',
})