Sign inSign up

msales/double-team

By msales

•Updated almost 7 years ago

A HTTP Kafka producer that handles outages.

Image
0

2.2K

msales/double-team repository overview

⁠Double-Team

Go Report Card Build Status Docker build Coverage Status GitHub release GitHub license

⁠Synopsis

A HTTP Kafka producer that handles outages.

⁠Usage

Double-Team can be used in two different modes: server and restore

⁠Server

Server mode accepts HTTP post requests and publishes them to Kafka.

⁠Restore

Restore mode sends messages from S3 to Kafka.

⁠Configuration

⁠Server

The Double-Team server ./double-team server can be configured with the following options:

FlagDescriptionEnvironment Variable
--portThe address to bind to for the http server.PORT
--log-levelThe log level to use (options: debug, info, warn, error).LOG_LEVEL
--log-formatLog format to use (eg.: json, terminal).LOG_FORMAT
--log-tagsAdditional tags for logs.LOG_TAGS
--stats-dsnThe statistics service to send metrics to (e.g.: l2met://, prometheus://0.0.0.0:8082).STATS_DSN
--stats-prefixPrefix for statistics.STATS_PREFIX
--stats-tagsAdditional tags for stats.STATS_TAGS
--kafka.brokersThe kafka seed brokers connect to. Format: 'ip:port' (multiple allowed).DOUBLE_TEAM_KAFKA_BROKERS
--kafka.versionVersion of Kafka for producing messages: '2.3.0'.DOUBLE_TEAM_KAFKA_VERSION
--kafka.retryThe number of times to retry sending to Kafka.DOUBLE_TEAM_KAFKA_RETRY
--s3.endpointThe S3 endpoint to use. This is mainly for debugging.DOUBLE_TEAM_S3_ENDPOINT
--s3.regionThe S3 region the bucket exists in.DOUBLE_TEAM_S3_REGION
--s3.bucketThe S3 bucket to write messages to.DOUBLE_TEAM_S3_BUCKET
⁠Restore

The Double-Team server ./double-team restore can be configured with the following options:

FlagDescriptionEnvironment Variable
--log-levelThe log level to use (options: debug, info, warn, error).LOG_LEVEL
--log-formatLog format to use (eg.: json, terminal).LOG_FORMAT
--log-tagsAdditional tags for logs.LOG_TAGS
--stats-dsnThe statistics service to send metrics to (e.g.: l2met://, prometheus://0.0.0.0:8082).STATS_DSN
--stats-prefixPrefix for statistics.STATS_PREFIX
--stats-tagsAdditional tags for stats.STATS_TAGS
--kafka.brokersThe kafka seed brokers connect to. Format: 'ip:port' (multiple allowed).DOUBLE_TEAM_KAFKA_BROKERS
--kafka.versionVersion of Kafka for producing messages: '2.3.0'.DOUBLE_TEAM_KAFKA_VERSION
--kafka.retryThe number of times to retry sending to Kafka.DOUBLE_TEAM_KAFKA_RETRY
--s3.endpointThe S3 endpoint to use. This is mainly for debugging.DOUBLE_TEAM_S3_ENDPOINT
--s3.regionThe S3 region the bucket exists in.DOUBLE_TEAM_S3_REGION
--s3.bucketThe S3 bucket to read messages from.DOUBLE_TEAM_S3_BUCKET

⁠Server HTTP Endpoints

⁠POST /

Accepts a JSON payload with the message topic and data.

⁠Payload:
{
	"topic": "test",
	"key": "key",
	"data": "test data"
}
⁠GET /health

Gets the current health status of the server. Returns a 200 status code if the server is healthy, otherwise a 503 status code

⁠License

MIT-License. As is. No warranties whatsoever. Mileage may vary. Batteries not included.

Tag summary

Content type

Image

Digest

Size

8.5 MB

Last updated

almost 7 years ago

docker pull msales/double-team