Shopify Remix + Redis (BullMQ) — Looking for Guidance

Hey everyone :waving_hand:

I’m currently working on a Shopify Remix embedded app, and I’m trying to set up Redis (BullMQ) for background jobs. I’ve been trying to figure out the right way to structure everything, and I’d really appreciate some guidance from people who’ve done this before.


:light_bulb: What I’m building

In my app, I need to handle a few background tasks like:

  • Updating cart data

  • Updating orders through Shopify Admin API

  • Sending transactional emails

These involve multiple API calls and some processing, so I want to move them into background jobs using Redis queues to:

  • Keep the Shopify UI fast

  • Avoid blocking requests

  • Make retries and reliability easier to manage


:red_question_mark: What I’m trying to figure out

I’m a bit unsure about the “right way” to structure this, especially in a Shopify Remix setup:

  • How do you usually structure Shopify + Redis (BullMQ) apps in production?

  • What’s the best practice for using Shopify Admin API inside workers?

  • What should actually go into the queue payload (shop, orderID, tokens, etc.)?

  • How do you normally separate:

    • Remix Shopify server logic

    • Redis workers

    • shared utilities/services

And if anyone has a reference repo or example setup, that would honestly be super helpful :folded_hands:

Hey @Eesha_Shahid,

Personally I’m not too familiar with Redis (BullMQ). However, from the Shopify side of this, here are a few resources that can help.

For process separation, the CLI app structure supports a dedicated background role in shopify.web.toml:

roles = ["background"]
commands.dev = "npm run dev"

This keeps your Remix server and workers as distinct processes, each with their own injected environment variables (API keys, host, scopes, etc.). The app structure docs cover the full config.

For async event handling, the pattern is webhooks delivered to Google Cloud Pub/Sub or AWS EventBridge rather than polling, which feeds naturally into a worker queue. Cloud Run and other supported providers all handle multi-process deployments well.

For other examples outside of Shopify, if you want to skip managing Redis/BullMQ infrastructure entirely, Gadget has built-in background actions for Shopify apps. Their tutorials may be a helpful starting point.

Hopefully others in the community have some BullMQ-specific context to share too.