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

242
Visualizações
How to publish continuous without blocking main NodeJS app with MQTT.JS

I have the following problem: I have a Node JS application which should be controlled via Mqtt. It should use the callback function to evaluate messages as to whether the application should start or stop. This already works very well. However, this application should publish its status every second. However, this should not block the main application. I have already implemented an application that does exactly this in Python. This uses a thread to send the status and does not block the main thread. I need a way to outsource a send state function to a background process.

Since JavaScript only knows single threads, is there a way to enable this? I've already dealt with workers but don't want to outsource the code to an external file.

thank you

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