question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is node-resque really compatible with Sidekiq?

See original GitHub issue

Hi, just considering using node-resque combined with sidekiq. I am having some problems with the integration, so I am leaving my feedback here:

  • Workers started from node-resque do not show in Sidekiq web. Sidekiq when starting new workers add the name of the worker to the set processes, node-resque doesn’t seem like it does. https://github.com/mperham/sidekiq/blob/4deadba37200bf7812109a2d6de2371727b2ee3f/lib/sidekiq/launcher.rb#L133
  • Adding new jobs from node-resque to Sidekiq works fine.
  • Stats shown in Sidekiq Web are correctly updated, both failed and processed jobs.
  • Scheduled jobs from node-resque are not shown in Sidekiq web (Scheduled tab).
  • Scheduled jobs from node-resque requires a worker from node-resque. I add a scheduled job from node-resque using enqueueIn, scheduler is also run in this same process. Sidekiq worker is started and ready to run jobs all the time. After the delay time, nothing happens. To be able to run this job, a worker from node-request must be started.

Please, it would be highly appreciated to document all these caveats (and some others that may exist) in the README for future developers. I don’t think that with current features, and caveats between sidekiq and node-resque should be stated that node-resque is API compatible with Sidekiq because it does not.

Node version: 12.2.0 Ruby version: 2.5.0 Sidekiq Version: 6.0.3. I also checked older versions just in case some fully works. Node-resque version: 6.0.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dorthweincommented, Jan 8, 2021

I’m having trouble enqueing a sidekiq job from node-resque - is it simlpy a matter of calling await queue.enqueue(que, job, args); and setting the correct que and job? Thanks

UPDATE: So by default sidekiq does not have a name space - if you want to schedule from node-resque to sidekiq besure to pass an empty string to your connection namespace. Example below.

 const queue = new Queue(
    {
      connection: {
        pkg: "ioredis",
        host: "127.0.0.1",
        password: null,
        port: 6379,
        database: 0,
        namespace: "",
        // looping: true,
        // options: {password: 'abc'},
      },
    },
    { ...Jobs }
  );
0reactions
evantahlercommented, Jan 8, 2021

Thanks for the research @dorthwein! This issue is linked from the Readme, so hopefully this helps others in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sidekiq Compatibility across Updates - GitLab Docs
Sidekiq Compatibility across Updates. The arguments for a Sidekiq job are stored in a queue while it is scheduled for execution. During a...
Read more >
What is a good Sidekiq-like job system for node.js?
Resque and Sidekiq share the same data structures. In node, getting multiple jobs to process at once is very simple.
Read more >
Ode-resque: Redis-backed Job Queue
This project is a very opinionated but API-compatible with Resque and Sidekiq (caveats). We also implement some of the popular Resque plugins, ...
Read more >
bull vs kue vs node-resque vs node-sidekiq vs sidekiq
Sick of boring JavaScript newsletters? Bytes newsletter logo ... Bytes is a JavaScript newsletter you'll actually enjoy reading. Delivered every Monday, for free....
Read more >
Job Queues - npm - Socket
A really simple message queue based on Redis. queue · messagequeue · jobs · message-queue · redis ... node-resque ... Compatible version of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found