DEV Community

Cover image for OSD700: Working with BullMQ Worker/Queues
TD
TD

Posted on

2

OSD700: Working with BullMQ Worker/Queues

This week I got to work with workers/queues without prior experience. I had to fill gaps in my understanding, and implement functionality simultaneously, so this week was less productive in terms of coding and more in terms of learning.
One of the main reasons I struggled working with BullMQ API was that the concepts seemed too abstract. It took me a while to understand the relationship between Queues and Workers and how to leverage them to run background tasks to check whether we have to send email reminders to users or not.

I added a background job to Starchart to repeat every 5 minutes and check whether any domains or certificates in the database expire in less than a month. We send out notifications if we find such an entry in the database. We are also keeping track of the number of times we have notified the user, as we only want to send up to two reminders. The first reminder will be sent out one month in advance, and the second reminder will only be sent out close to the expiration date.

At the moment, I want to send the first reminder without any problems or side effects. If that goes well, I will work on sending another reminder close to the expiration date.

I want to get comfortable working with BullMQ workers and queues, as the api can be leveraged in many projects requiring background job processing to solve real-world problems without burdening the application.

Postgres on Neon - Get the Free Plan

No credit card required. The database you love, on a serverless platform designed to help you build faster.

Get Postgres on Neon

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay