-
Notifications
You must be signed in to change notification settings - Fork 416
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
Requeuer and Message Delay #469
Conversation
Co-authored-by: ccoVeille <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you liked my feedbacks
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #469 +/- ##
==========================================
- Coverage 73.55% 73.42% -0.13%
==========================================
Files 61 65 +4
Lines 3278 3424 +146
==========================================
+ Hits 2411 2514 +103
- Misses 715 746 +31
- Partials 152 164 +12 ☔ View full report in Codecov by Sentry. |
_examples/real-world-examples/delayed-requeue/docker-compose.yml
Outdated
Show resolved
Hide resolved
|
||
## Usage | ||
|
||
Set the `DATABASE_URL` environment variable to your PostgreSQL connection string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to provide example one - they are 10 different formats and it's useful to have it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,32 @@ | |||
# pq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably it would be nice to link here from poison queue godoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which one, though? The SQL one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add more docs in a follow-up PR.
* Added `PostgreSQLQueueSchema` and `PostgreSQLQueueOffsetsAdapter`. * This schema is similar to the original one, except it allows filtering messages with a custom `WHERE` clause. * It doesn't support customer groups. * It allows deleting messages from the table after acking (optional). * Added `NewDelayedPostgreSQLPublisher` and `NewDelayedPostgresSQLSubscriber` * They work on top of the conditional schema and use the `delay` component implemented in ThreeDotsLabs/watermill#469 * The idea is to receive messages with a delay or at a given time in a simple way. * Reworked the `SchemaAdapter` and `OffsetsAdapter` interfaces **(Breaking change -> will bump the major to v4)**. * We had a few instances where some details have been missing from one of the interface methods. It makes it difficult to extend this library with new features, as each will require a major version bump, and we want to avoid it if possible. * To mitigate this, we're moving to a `params` struct passed to the methods instead of raw arguments. It adds some verbosity but allows extending the params if needed with no breaking changes to the library. * The methods now also return errors. * Migration: if you don't use a custom schema/offsets adapter, you don't need to do anything. If you do, change the methods to implement the new interfaces. Use values from the `params` argument and return errors.
Requeuer
component.delay
component to delay the forwarding.delay
package. It contains helpers for setting delay metadata on messages.Requeuer
component).pq
CLI tool for working with poison queues.