Commit e6c94ab
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 dc33580 commit e6c94ab
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1363 | 1363 | | |
1364 | 1364 | | |
1365 | 1365 | | |
1366 | | - | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
1367 | 1374 | | |
1368 | 1375 | | |
1369 | 1376 | | |
| |||
0 commit comments