Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store headers about send delay/send_at timestamp #372

Open
v0idpwn opened this issue Dec 30, 2024 · 0 comments
Open

Store headers about send delay/send_at timestamp #372

v0idpwn opened this issue Dec 30, 2024 · 0 comments

Comments

@v0idpwn
Copy link
Collaborator

v0idpwn commented Dec 30, 2024

Currently, we don't store information about if a message had a delay. We could store it in the message headers:

select * from pgmq.send('my_queue', '{}'::jsonb, 10);
select msg, headers from pgmq.read('my_queue', 5, 5);
| msg |         headers        |
| {}  | {"x-pgmq-send-in": 10} |

Additionally, we can send with delay based on these headers:

-- This:
select * from pgmq.send('my_queue', '{}'::jsonb, '{"x-pgmq-send-in": 5}'::jsonb)
-- Could be equivalent to:
select * from pgmq.send('my_queue', '{}'::jsonb, 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant