消费者-pgmq – 死信队列新功能

1作者: tiagorosadacost4 个月前原帖
大家好!<p>我在这里展示我在名为 consumer-pgmq 的 Node.js 模块中实现的死信队列功能。如果我设置尝试 2 次后消息仍然失败,那么在第三次尝试时,消息将被发送到死信队列。<p>这是什么呢?<p>最近我发现了 Supabase 上的一个队列功能,我可以使用 PostgreSQL 数据库来实现消息队列。<p>如果你在 Supabase 之外运行 PostgreSQL,也可以使用这个队列功能,你只需安装名为 pgmq 的扩展。说明链接:https://github.com/pgmq/pgmq<p>但我注意到有些东西缺失,我认为在 Npm 上没有找到一个可以从消息中轮询并将其传递给我定义的函数以执行某些操作的包。因此,我创建了一个名为 consumer-pgmq 的 npm 包,它与 Supabase 和 PostgreSQL 集成。<p>Npm 模块链接:https://www.npmjs.com/package/consumer-pgmq Github 仓库链接:https://github.com/tiago123456789/consumer-pgmq
查看原文
Hi everyone!<p>I’m here to show the dead letter queue feature I implemented on the node.js module named consumer-pgmq, so if I set up to try 2 times and the message failed 2 times on the third time will send the message to the dead letter queue.<p>What is it?<p>Recently I discovered a feature queue on Supabase where I can implement a messaging queue using Postgresql database.<p>Spoiler if you have a Postgresql running out of Supabase you can use the queue feature too, you need only install the extension named pgmq. Link of instructions: https:&#x2F;&#x2F;github.com&#x2F;pgmq&#x2F;pgmq<p>But I noticed something missing on my opinion I didn’t find a package on Npm to make the polling from the message and passing to a function I defined to execute something, so as result of it I created the npm package named consumer-pgmq where integrate with Supabase and Postgresql<p>Link of module on Npm: https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;consumer-pgmq Link of Github repository: https:&#x2F;&#x2F;github.com&#x2F;tiago123456789&#x2F;consumer-pgmq