• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Buffer HTTP requests and replay them later

httpq

With Httpq, you can buffer HTTP requests and replay them later, and persistence can be either to Redis or to disk. This is useful for buffering HTTP requests that do not have to be processed in realtime, such as webhooks.

Installation

$ go install github.com/DavidHuie/httpq/cmd/httpq

Using Redis

$ httpq -redis=true -redis_url=":6379"

Using disk persistence

$ httpq -db_path="/tmp/httpq.db"

Queuing a request

$ curl localhost:3000/push

Replaying a request

$ curl localhost:3000/pop

GET /push HTTP/1.1
Host: localhost:3000
Accept: */*
User-Agent: curl/7.37.1

Determining size of queue

The result is returning as JSON.

$ curl localhost:3000/size

{"size":3}