Commit 11f6ae2
committed
fix(cloudflare): use queue dev.id for consumer resource ID in local dev mode
In local dev mode, Queue resources return an empty string for `id`
(Cloudflare API ID) since no remote API call is made. When a Worker
has multiple eventSources, all QueueConsumers were derived as
`${queue.id}-consumer` which all resolved to "-consumer",
causing concurrent Promise.all writes to the same state file.
This led to corrupted JSON state files and silently broken queue
consumers — the Worker HTTP endpoint would respond normally but
queue messages were never consumed.
Fix: use `queue.dev.id` (the resource ID, e.g. "email-queue") in
local dev mode, which is always unique per queue.
Fixes #13631 parent 822a883 commit 11f6ae2
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
1566 | | - | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
1567 | 1574 | | |
1568 | 1575 | | |
1569 | 1576 | | |
| |||
0 commit comments