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

BullMq Flows? #26

Open
timganter opened this issue Oct 3, 2023 · 5 comments
Open

BullMq Flows? #26

timganter opened this issue Oct 3, 2023 · 5 comments

Comments

@timganter
Copy link

timganter commented Oct 3, 2023

Hi there! Is support for BullMQ flows on the roadmap for this package? 🙂

@RomainLanz
Copy link
Owner

Hey @timganter! 👋🏻

I have never heard of it!
Skimming through the doc, it indeed seems a nice feature to have. So expect to have it land on the next major release (the one to support AdonisJS V6).

@timganter
Copy link
Author

That's awesome to hear! Thanks @RomainLanz ! 🎉

@ThisIsMissEm
Copy link

ThisIsMissEm commented Jun 6, 2024

So just some small caveats: I've just been trying to get Bullmq Flows to work, and there some issues I've encountered:

  1. Flows basically destroy all types, like, everything you do with them will be unsafe. With Queues and Workers you can type them like:
const DownloadWorker = new Worker<MediaDownloadData, MediaDownloadResult>(

export const MediaDownloadQueue = new Queue<MediaDownloadData, MediaDownloadResult>(
  1. FlowProducer and FlowJobs do not at all like working with MemoryDB or Redis Cluster mode, I'm not sure why, but they just hang on producing jobs that the Worker can pick up. From my experience with Bullmq, hangs tend to happen when a connection cannot be established, but even passing in the correct connection args it just didn't work.

  2. Good luck with typings on connections: Bullmq ships it's own types for RedisConnection, and doesn't seem natively aware of RedisClusterConnection.

So basically: you loose typesafety with your jobs, and you'll hit into hard to debug connection issues when using MemoryDB or Redis Cluster mode.

@RomainLanz
Copy link
Owner

Thanks for the feedback! Maybe we should wait a bit before implementing them inside this package.

Also, it seems it may be "experimental".

Flows are a brand new feature in BullMQ, and although is implemented on a stable foundation there could be some unknown issues.

@ThisIsMissEm
Copy link

@RomainLanz yeah, it cost me a good few hours ripping them out and figuring out an alternative approach.

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

No branches or pull requests

3 participants