Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
Equivalent of Stomp.over in server side code

Is there a backend (nodejs, java, etc) equivalent of Stomp.over? I want to mimic the client side code like below:

var socket = null;
var stompClient = null;
var connectCallback = function() {
  console.log(stompClient.ws._transport.url); //get autogenerated url and session id here
}
var websocketConnect = function(){
  socket = new SockJS("/websocket");
  stompClient = Stomp.over(socket);
  stompClient.connect({}, connectCallback);
}
websocketConnect();
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.4.0/sockjs.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"></script>

This is to get the url returned by Stomp.over below, especially the generated sessionid:

wss://<base domain>/websocket/<sessionid>/

I want to use it for testing in k6, since it needs a wss url:

ws.connect(url, null, function (socket) {...}

The reason for this is I want to spawn different urls/sessions, mimicking different users opening their browsers and connecting to a base websocket url, then sending/receiving data to each using k6, thereby load testing it.

I have tried using node libraries such as stompjs and sockjs-client, but it differs in behavior, the object generated does not have an append a sessionid or similar, both just takes a full url in their constructor.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda