watermill
watermill copied to clipboard
Requeuer and Message Delay
trafficstars
- Added the
Requeuercomponent.- It works as a simpler version of the Forwarder, routing messages from one topic to another (a dynamic one).
- Can be used to move messages that failed to process back to the original topic, so they don't block other messages.
- Can be used together with the poison middleware and the
delaycomponent to delay the forwarding.
- Added the
delaypackage. It contains helpers for setting delay metadata on messages.- Does not do anything by itself. A Pub/Sub needs to support it explicitly. For now, that's the delayed postgres Pub/Sub implemented in https://github.com/ThreeDotsLabs/watermill-sql/pull/34
- Use case 1: publishing a message after a given delay or at given time (see the example).
- Use case 2: automatically moving messages out of the poison queue to the original topic after a delay (used together with the
Requeuercomponent).
- Added the
pqCLI tool for working with poison queues.