Skip to content

Commit f122db4

Browse files
committed
add instruction for running separate queue workers
1 parent 3704b68 commit f122db4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/content/docs/queues/configuration/local-development.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ Local development sessions create a standalone, local-only environment that mirr
4949

5050
Refer to the [`wrangler dev` documentation](/workers/wrangler/commands/#dev) to learn more about how to configure a local development session.
5151

52-
## Known Issues
52+
If you want to run separate producer and consumer Workers bound to the same Queue locally, you can use the [experimental feature](/workers/runtime-apis/bindings/service-bindings/#local-development) of Wrangler. To develop locally with separate producer and consumer Workers, you can start the development server with the following command:
5353

54-
Wrangler does not yet support running separate producer and consumer Workers bound to the same Queue locally. To develop locally with Queues, you can temporarily put your consumer's `queue()` handler in the same Worker as your producer, so the same Worker acts as both a producer and consumer.
54+
```sh
55+
# From the producer Worker directory
56+
npx wrangler dev -c ./wrangler.jsonc -c ../consumer-worker/wrangler.jsonc --persist-to .wrangler/state
57+
```
58+
59+
## Known Issues
5560

56-
Wrangler also does not yet support `wrangler dev --remote`.
61+
- When developing locally, you can not connect your Worker to the remote queue. Hence, Queues does not yet support `wrangler dev --remote`.

0 commit comments

Comments
 (0)