Skip to content

Commit 4d65954

Browse files
authored
Update local-development.mdx
1 parent 7ac268b commit 4d65954

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

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

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,38 +50,26 @@ Local development sessions create a standalone, local-only environment that mirr
5050
Refer to the [`wrangler dev` documentation](/workers/wrangler/commands/#dev) to learn more about how to configure a local development session.
5151

5252
## Separating producer & consumer Workers
53-
54-
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.
53+
Wrangler supports running multiple Workers simultaneously with a single command. If your architecture separates the producer and consumer into distinct Workers, you can use this functionality to test the entire message flow locally.
5554

5655
:::caution
57-
5856
Support for running multiple Workers at once with one Wrangler command is experimental, and subject to change as we work on the experience. If you run into bugs or have any feedback, [open an issue on the workers-sdk repository](https://github.com/cloudflare/workers-sdk/issues/new)
59-
6057
:::
6158

62-
For a project with the following structure,
63-
59+
For example, if your project is setup with the following directory structure:
6460
```
65-
project-root/
66-
├── consumer-worker/
67-
│ ├── wrangler.jsonc
68-
│ └── index.ts
69-
└── producer-worker/
61+
producer-worker/
62+
├── wrangler.jsonc
63+
├── index.ts
64+
└── consumer-worker/
7065
├── wrangler.jsonc
7166
└── index.ts
7267
```
7368

74-
you can start the development server with the following command:
75-
69+
You can start the development server for both workers with the following command:
7670
```sh
77-
# navigate to the producer Worker directory
78-
# cd producer-worker
79-
# From the producer Worker directory
80-
npx wrangler dev -c ./wrangler.jsonc -c ../consumer-worker/wrangler.jsonc --persist-to .wrangler/state
71+
npx wrangler dev -c wrangler.jsonc -c consumer-worker/wrangler.jsonc --persist-to .wrangler/state
8172
```
82-
83-
The development server will start and you will see output similar to the following:
84-
8573
```sh output
8674
⛅️ wrangler 4.13.2
8775
-------------------
@@ -96,6 +84,8 @@ No bindings found.
9684
[wrangler:inf] Ready on http://localhost:8787
9785
```
9886

87+
When the producer Worker sends messages to the queue, the consumer Worker will automatically be invoked to handle them.
88+
9989
## Known Issues
10090

10191
- 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)