Queue too slow ?

Hello! I'm implementing Cloudflare Queue in my projects.
My Producer and Consumer are in the same Worker.

However, I expected a shorter time to send messages.

const startedAt = Date.now()
await env.MY_QUEUE.send({ foo: "bar"})
console.info("took", Date.now() - startedAt)


After some tests, I get an average of 160 ms

Shouldn't it be faster, since they are on the same worker? Is my test wrong or I missed something?
Was this page helpful?