stompcooler.js
/**
   * Set up STOMP subscriptions based on html attributes.
   *
   * @param config {object} - JQuery object with connection attributes
   * @returns client {object} - connected STOMP client
   */
Set up STOMP subscriptions based on html attributes.
@param config {object} - JQuery object with connection attributes
@returns client {object} - connected STOMP client
Set up STOMP subscriptions based on html attributes . @param config { object } - JQuery object with connection attributes @returns client { object } - connected STOMP client
function initSubscriptions(config) {
    const ws_uri = getAttr(config, "data-ws-uri", "ws://localhost:15674/ws");
    const default_queue = getAttr(config, "data-default", "/topic/default");
    const username = getAttr(config, "data-username", "guest");
    const password = getAttr(config, "data-password", "guest");
    const vhost = getAttr(config, "data-vhost", "/");
    let client = Stomp.over(new WebSocket(ws_uri));
    client.connect(
      username,
      password,
      getOnConnectCallBack(client, default_queue),
      logConnectionError,
      vhost
    );
    return client;
  }
function initSubscriptions ( config ) { const ws_uri = getAttr ( config , "data-ws-uri" , "ws://localhost:15674/ws" ) ; const default_queue = getAttr ( config , "data-default" , "/topic/default" ) ; const username = getAttr ( config , "data-username" , "guest" ) ; const password = getAttr ( config , "data-password" , "guest" ) ; const vhost = getAttr ( config , "data-vhost" , "/" ) ; let client = Stomp . over ( new WebSocket ( ws_uri ) ) ; client . connect ( username , password , getOnConnectCallBack ( client , default_queue ) , logConnectionError , vhost ) ; return client ; }
Set up STOMP subscriptions based on html attributes.
Set up STOMP subscriptions based on html attributes .