Codigami / gohaqd

A worker daemon for consuming messages from a queue.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gohaqd

Build Status Go Report Card Docker Pulls

gohaqd (pronounced as go-hawk-d) is a worker daemon for consuming messages from a queue.

It pulls data off a queue, inserts it into the message body, and sends an HTTP POST request to a user-configurable URL. Currently supports only AWS SQS.

Usage:

  gohaqd [flags]

Flags:

      --aws-region string        AWS Region for the SQS queue (default "us-east-1")
  -c, --config string            config file path (default "./gohaqd.yaml")
      --healthcheck-url string   HTTP endpoint for checking if consumer server is up
  -h, --help                     help for gohaqd
      --parallel int             Number of messages to be consumed in parallel (default 1)
      --port int                 Port used by metrics server (default 8090)
  -q, --queue-name string        queue name. (Used only when --config is not set and default config doesn't exist)
      --sqs-endpoint string      SQS Endpoint for using with fake_sqs
  -u, --url string               HTTP endpoint. Takes the URL from the message by default. (Used only when --config is not set and default config doesn't exist)

Sample config file:

---
queues:
- name: test
  url: http://localhost:8080/consume
- name: test2
- name: test3
  parallel: 3

About

A worker daemon for consuming messages from a queue.

License:MIT License


Languages

Language:Go 92.7%Language:Dockerfile 4.9%Language:Shell 2.4%