Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda