watermill icon indicating copy to clipboard operation
watermill copied to clipboard

Requeuer and Message Delay

Open m110 opened this issue 1 year ago • 1 comments
trafficstars

  • Added the Requeuer component.
    • 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 delay component to delay the forwarding.
  • Added the delay package. 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 Requeuer component).
  • Added the pq CLI tool for working with poison queues.

m110 avatar Aug 20 '24 21:08 m110