Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!