Skip to content

Commit 7ac268b

Browse files
committed
minor updates
1 parent f122db4 commit 7ac268b

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

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

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,53 @@ 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-
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:
52+
## 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.
55+
56+
:::caution
57+
58+
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+
60+
:::
61+
62+
For a project with the following structure,
63+
64+
```
65+
project-root/
66+
├── consumer-worker/
67+
│ ├── wrangler.jsonc
68+
│ └── index.ts
69+
└── producer-worker/
70+
├── wrangler.jsonc
71+
└── index.ts
72+
```
73+
74+
you can start the development server with the following command:
5375

5476
```sh
77+
# navigate to the producer Worker directory
78+
# cd producer-worker
5579
# From the producer Worker directory
5680
npx wrangler dev -c ./wrangler.jsonc -c ../consumer-worker/wrangler.jsonc --persist-to .wrangler/state
5781
```
5882

83+
The development server will start and you will see output similar to the following:
84+
85+
```sh output
86+
⛅️ wrangler 4.13.2
87+
-------------------
88+
89+
Your Worker and resources are simulated locally via Miniflare. For more information, see: https://developers.cloudflare.com/workers/testing/local-development.
90+
91+
docs-queue-producer has access to the following bindings:
92+
- Queues:
93+
- MY_QUEUE: <queue_name> [simulated locally]
94+
No bindings found.
95+
⎔ Starting local server...
96+
[wrangler:inf] Ready on http://localhost:8787
97+
```
98+
5999
## Known Issues
60100

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