pq

command module
v0.0.0-...-d6b5dc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 6 Imported by: 0

README

pq

pq is a CLI tool for working with delayed messages on poison queues.

For now, it supports the PostgreSQL Pub/Sub implementation.

Install

go install github.com/ThreeDotsLabs/watermill/tools/pq@latest

Usage

Set the DATABASE_URL environment variable to your PostgreSQL connection string.

For example, to connect to the database used for the delayed requeue example:

export DATABASE_URL="postgres://watermill:password@postgres:5432/watermill?sslmode=disable"
pq -backend postgres -topic requeue

This will use the default watermill_ prefix, so will use the watermill_requeue table.

If you use a custom prefix, use the -raw-topic flag instead:

pq -backend postgres -raw-topic my_prefix_requeue

Commands

  • Requeue — Updates the _watermill_delayed_until metadata to the current time, so the message will be instantly requeued.
  • Ack — Removes the message from the queue (be careful — you will lose the message forever).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL