Open jason810496 opened 2 months ago
Hi @jason810496, thanks for asking!
Each message has a field read_ct
that increments every time the message is read with pgmg.read()
select * from pgmq.read(queue_name => 'myqueue', vt => 10, qty => 1);
msg_id | read_ct | enqueued_at | vt | message
--------+---------+-------------------------------+-------------------------------+--------------------
1 | 1 | 2024-07-01 12:39:02.198732+00 | 2024-07-01 12:39:28.176894+00 | {"hello": "world"}
There isn't a mechanism that will automatically move the message to another queue (like a DLQ or something). But what some projects do is have their consumer check the read_ct
value then move/archive/delete the message if it exceeds some value.
Thanks for the reply, @ChuckHend 🙏
I will use read_ct
to mark the message as failed to process.
Hi, @v0idpwn Do you have any description on how to use the project? Thanks.
@jason810496 there's some info in the documentation and on broadway documentation
Hi,
I am currently using
pgmq
as an alternative to RabbitMQ. I'm wondering if the current project supports a retry mechanism (likex-retry-count
in RabbitMQ), or if I need to create another table to record the retry count to implement it.Thank you for your help!