Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding job from another language (php,perl,Ruby etc) #1783

Closed
amit777 opened this issue Jul 1, 2020 · 17 comments
Closed

Adding job from another language (php,perl,Ruby etc) #1783

amit777 opened this issue Jul 1, 2020 · 17 comments
Labels

Comments

@amit777
Copy link

amit777 commented Jul 1, 2020

We rolled our own simple queue system with Redis and have components in different languages that can push jobs into the queue. Is there a documented or recommended way to do this with bull?

@manast
Copy link
Member

manast commented Jul 1, 2020

The easiest way right now is to pick the "addJob" lua script and try to use it from the other languages...

@suchakraborty
Copy link

I was using express and bull-master - so my solution was to expose an API by adding an endpoint in each queue /<queue>/add that takes the JSON from POST body as job data to that queue. So as long as I can form a JSON and send an HTTP POST - I can add a job.

@gabegorelick
Copy link
Contributor

This comes up a lot:
#323
#573
#918
#1040
#1261
#1373

@manast
Copy link
Member

manast commented Jan 15, 2021

I have almost completed a redis module that implements Bull/BullMQ which besides being much better it will of course work from any languange that has a redis client available. Stay tuned!

@dphaener
Copy link

Anyone here still needing to push jobs to Bull from another language, check this out: https://github.com/bitfinexcom/caron. I have this running next to my Node service and am easily able to push items onto a Redis list, which is then popped from Redis by caron and then enqueued for the Bull workers.

@stale
Copy link

stale bot commented Aug 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added wontfix and removed wontfix labels Aug 20, 2021
@stale
Copy link

stale bot commented Oct 23, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 23, 2021
@gabegorelick
Copy link
Contributor

gabegorelick commented Oct 25, 2021

I have almost completed a redis module that implements Bull/BullMQ which besides being much better it will of course work from any languange that has a redis client available. Stay tuned!

Any update on this @manast?

@stale stale bot removed the wontfix label Oct 25, 2021
@manast
Copy link
Member

manast commented Oct 28, 2021

@gabegorelick not yet. What is your specific use case where you would need this?

@gabegorelick
Copy link
Contributor

What is your specific use case where you would need this?

A few things:

  • Ability to do more things atomically. E.g. if you wanted to atomically peek and modify jobs in the queue, today your best bet is often to figure out Bull's data structures (since they're not officially documented) and write a Lua script that interacts with them. A native Redis-side API would make such problems much easier to solve.

  • Interacting with Bull directly from redis-cli. This would make management easier. Right now to investigate issues, you often need to write custom code to query Bull, and then maybe more code to fix up issues with jobs in the queue. A lot of that work would be easier if it could be done directly from redis-cli.

  • Connecting from other languages, as a bunch of commenters have stated.

@manast
Copy link
Member

manast commented Oct 29, 2021

@gabegorelick
I am not sure you have seen the POC version of the module: https://github.com/taskforcesh/bullmq-redis
It should be backwards compatible with BullMQ at least.

@stale
Copy link

stale bot commented Dec 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 28, 2021
@stale stale bot closed this as completed Jan 4, 2022
@hellojukay
Copy link

Any news on this?

@manast
Copy link
Member

manast commented Oct 19, 2022

@hellojukay from which language would you like to interoperate with Bull?

@hellojukay
Copy link

@manast I want to consume job from golang.

@manast
Copy link
Member

manast commented Oct 19, 2022

We are planning something for early next year, but short-term consuming jobs from a different language is quite hard. You would need to port some of the code in Bull that handles jobs consumptions, easiest pattern would be consuming manually like this: https://docs.bullmq.io/patterns/manually-fetching-jobs

@manast
Copy link
Member

manast commented Oct 19, 2022

Btw, development for this feature will happen here: https://github.com/taskforcesh/bullmq-redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants