Manage the dead letter queue with the CLI
List, replay, and discard dead letter queue events from the command line using the Unity Gaming Services CLI.
Read time 2 minutesLast updated 3 hours ago
You can use the Unity Gaming Services CLI to interact with the dead letter queue (DLQ). The CLI allows you to list dead letter queue (DLQ) events, fetch a single event by ID, replay events to retry delivery, and discard events from the command line.
Prerequisites
For detailed CLI setup instructions, refer to the Unity Gaming Services CLI Get Started guide. To follow this guide, you first need to complete the following actions:- Install the UGS CLI.
-
Configure your Project ID and Environment in the following format:
ugs config set project-id <your-project-id>
ugs config set environment-name <your-environment-name> -
Configure a Service Account with the required roles for Triggers:
- Triggers DLQ Viewer (to list and get events).
- Triggers DLQ Manager (to also replay and discard).
Using the CLI
For a full reference of all commands and options, refer to the Triggers Command Line documentation. For examples that use<event-id><event-id>List DLQ events
List events in the dead letter queue for the current project and environment:You can optionally filter by status or limit the number of results:ugs triggers dlq list
The output shows event ID, trigger name, source, status, and time created for each event.ugs triggers dlq list --status pendingugs triggers dlq list --limit 50
Get a DLQ event
Fetch a single DLQ event by ID and view its payload and metadata:ugs triggers dlq get <event-id>
Replay DLQ events
Replay queues the event for retry. The CLI returns immediately; a background worker re-publishes the event asynchronously. Replay a single pending event:Replay all pending events in the project and environment:ugs triggers dlq replay <event-id>
ugs triggers dlq replay --all
Discard DLQ events
Discard a single pending event (remove it from the queue without reprocessing):Discard all pending events in the project and environment:ugs triggers dlq discard <event-id>
ugs triggers dlq discard --all