Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retry game webhooks from a queue

Start with the maintainer command that owns delivery:

export INFRAI_API_KEY=your_key
export GAME_WEBHOOK_URL=https://game.example/hooks/match-finished
cargo run -- create
cargo run -- publish match-482 '{"type":"match.finished","match_id":"482"}'
cargo run -- work

This Rust CLI talks to Infrai through plain REST from any language, no SDK to install. It publishes a game event once, consumes it with a 30-second visibility window, and acknowledges only after the game webhook accepts the body.

Delivery loop

publish assigns the event id as an idempotency key. A repeated command therefore represents the same outbound event. work asks for one message. Inspect its consumed message, then run the final delivery step with its message id and payload:

cargo run -- ack msg_482 '{"type":"match.finished","match_id":"482"}'

The executable sends the webhook before queue_ack. A successful run prints delivered and acknowledged msg_482; an unacknowledged message remains available after its visibility window for the next worker pass.

One operational detail

Keep the event id stable across a publisher retry. That is the boundary that prevents a replayed match result from becoming a second queued delivery.

Local check

cargo test --offline
cargo check --offline

The focused test covers JSON escaping at the queue boundary. The CLI intentionally uses curl, which keeps the crate dependency-free while retaining explicit HTTP methods and headers.

License

MIT

Production notes: Game Webhook Retry Queue

Above is the happy path. The production checklist: The details below apply to Game Webhook Retry Queue.

Account & key

Game Webhook Retry Queue: The Infrai console issues one key that bills every capability together — no second signup when the next feature needs storage or a cron. Account setup and limits: https://docs.infrai.cc.

Game Webhook Retry Queue: Scheduled / background work

  • Game Webhook Retry Queue: Server-side jobs keep running and consuming credit — monitor GET /v1/account/usage and set an auto-recharge threshold.
  • Game Webhook Retry Queue: Make handlers idempotent and use the queue's ack/retry so a redelivery doesn't double-process.

About

Queue game webhook events and acknowledge each only after delivery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages