Replies: 2 comments 1 reply
-
It would also be beneficial to pass the raw PgmqMessageRecord or some of its attributes. Currently there is no way to access msg_id, read_ct, enqueued_at so no way to behave differently depending on how long it is being retried or how many retries are left. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This was implemented in 0.5.4 (#185). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The second argument to handlers (both queue and flow based) should accept a "context" object.
This is intended for few custom utilities and be extendable in future for user-defined api clients and stuff.
But the first implementation should just pass abortSignal so users can pass it to fetch and other abortable calls to gracefully abort when worker is shutting down.
This signal should be composed of the main shutdown signal AND message-specific timeout signal using AbortSignal.any() so we can also timeout handlers properly.
Proposed api:
queue worker:
flow worker:
Beta Was this translation helpful? Give feedback.
All reactions