Search code examples
javascriptphpactivemq-classicmqttstomp

stomp.js with multiple topics subscribe reads


As in MQTT, can I subscribe to all topics using the "#" character with Stomp?

var onConnect = function(frame) {
      debug("connected to MQTT");
      $('#connect').fadeOut({ duration: 'fast' });
      $('#connected').fadeIn();
      client.subscribe('#');
    };
/* ------------------------------ */
client.connect(login, passcode, function(frame) {
            client.debug("connected to Stomp");
client.subscribe('#', function(message) {});
});

Solution

  • No STOMP does not as a protocol have that sort of addressing definition built into the specification so it never supported that sort of global subscription. The address model in STOMP mostly adheres to the same as that of the ActiveMQ JMS client when it comes to wildcards which you can read about here.