Skip to content

Running separate process local queue producer and consumer doesn't work with -c -c pattern using wrangler environments #12212

@mrwillis

Description

@mrwillis

Trying to run a worker API (producer) and a separate queue worker (consumer) as per here https://developers.cloudflare.com/queues/configuration/local-development/.

The API is working and queueing messages but the queue never receives them.

wrangler dev -c ./apps/api/wrangler.jsonc -c ./apps/queues/wrangler.jsonc -e=dev --persist-to .wrangler/state

I get these logs

Using vars defined in apps/api/.dev.vars.dev
api has access to the following bindings:
[redacted]

Using vars defined in apps/queues/.env
queues has access to the following bindings:
Binding                             Resource                Mode
[redacted]

Which seems correct (eventhough queues should be using .dev.vars.dev, not .env). That looks like another bug.

But the queues never receive the messages

EDIT:

Created a working repro here

https://github.com/mrwillis/wrangler-queue-local-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions