以下は、私がhttps://dzone.com/articles/easy-messaging-stomp-overからgoogledしたWebクライアントのサンプルコードです。クライアントでstomp.jsを使用するときにstomp protocalを設定するにはどうすればよいですか?
<script type="text/javascript">
var client = Stomp.client("ws://localhost:61614/stomp", "v11.stomp");
client.connect("", "",
function() {
client.subscribe("jms.topic.test",
function(message) {
alert(message);
}, { priority: 9 }
);
client.send("jms.topic.test", { priority: 9 }, "Pub/Sub over STOMP!");
}
);
</script>
私の質問は、なぜ 'WS:// localhostを:61614 /ストンプ' でのActiveMQを接続されていない 'ストンプ:// localhostを:61614 /ストンプ'? activemq.xmlの以下のプロトコルの違いは何ですか?
<transportConnectors>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614"/>
</transportConnectors>