workers icon indicating copy to clipboard operation
workers copied to clipboard

Implement Queues Consumer handler

Open syumai opened this issue 1 year ago • 7 comments

  • Implement Queues Consumer handler and add to Module Worker.
    • https://developers.cloudflare.com/queues/platform/javascript-apis/

syumai avatar Apr 30 '23 03:04 syumai

Please 🙏

eliezedeck avatar Apr 08 '24 17:04 eliezedeck

I'll try to implement this in next few weeks.

syumai avatar Apr 12 '24 14:04 syumai

I'll try to implement this in next few weeks.

Thanks in advance. By the way, would you mind sharing the concrete steps that will be involved in doing the implementation? I'm curious to know how things work under the hood, who knows, I might even be able to contribute?

eliezedeck avatar Apr 15 '24 04:04 eliezedeck

It will be like the following steps.

  • producer side
    • add Wrapper package of Queue class (send / sendBatch)
      • https://developers.cloudflare.com/queues/reference/javascript-apis/#producer
  • consumer side (almost same as #45)
    1. add queue handler to workers-assets-gen command's shim.mjs
    2. add function to listen queue handler (like cron.go of #45).
  • add example

PRs are welcome!

syumai avatar Apr 16 '24 02:04 syumai