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

Add support for custom queue events #2376

Open
1 task done
JacobReynolds opened this issue Dec 26, 2024 · 2 comments
Open
1 task done

Add support for custom queue events #2376

JacobReynolds opened this issue Dec 26, 2024 · 2 comments
Labels

Comments

@JacobReynolds
Copy link

JacobReynolds commented Dec 26, 2024

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Currently I have to implement the new custom queue functionality by hand with something hacky like the following

const queueEvents = new QueueEventsPro(QUEUES.EVENTS_QUEUE, {
    connection: this.connection,
});
await queueEvents.waitUntilReady();

for (const event of Object.values(EventType)) {
  queueEvents.on(event as any, async (job) => {
    await this.processEvent(job);
  });
}

Describe the solution you'd like

Custom Queue Events were added last month in taskforcesh/bullmq#2844, however there are no NestJS decorators/classes added for it yet.

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

Being able to emit and process real-time distributed events.

@kamilmysliwiec
Copy link
Member

Would you like to create a PR for this?

@JacobReynolds
Copy link
Author

JacobReynolds commented Dec 29, 2024

Hey Kamil! Unfortunately this was just for a PoC that we won't be moving forward with, but I couldn't find anything online about the presence/lack of it in nestjs so wanted to add a note about it.

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

2 participants