Skip to content

About

Kotlin service that receives webhook payloads over TCP and fans them out asynchronously to multiple webhook endpoints — built to offload webhook distribution from monitor logic in high-volume reselling setups. Uses Ktor, coroutines, and an in-memory queue.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

WebhookManager

WebhookManager is a Kotlin service that receives webhook payloads over TCP and distributes them to multiple webhook endpoints.

It was used in my Reselling Monitors setup to separate webhook distribution from monitor logic and improve overall performance under higher event volume.

Why this project exists

Instead of each monitor sending webhooks directly to many destinations, monitors can send one payload to WebhookManager.
WebhookManager then handles fan-out delivery asynchronously.

Core features

  • TCP server for inbound webhook jobs
  • In-memory queue for asynchronous processing
  • Fan-out delivery to multiple webhook URLs per job
  • JSON serialization via kotlinx.serialization
  • Runtime configuration through config.json

Tech stack

  • Kotlin (JVM target: 18)
  • Ktor networking/client
  • Kotlin coroutines
  • Gradle (Kotlin DSL)

Configuration

WebhookManager loads config.json from the project root at startup.

Example:

{
  "address": "127.0.0.1",
  "port": 8080
}
  • address: interface/IP used for the TCP bind
  • port: listening TCP port

Build

From the project root:

./gradlew build

If Gradle wrapper artifacts are unavailable in your environment, use:

gradle build

Run

./gradlew run

Input payload format

WebhookManager expects a JSON structure equivalent to WebhookData:

  • webhooks: array of destination webhook URLs
  • embeds: Discord-style webhook body object

About

Kotlin service that receives webhook payloads over TCP and fans them out asynchronously to multiple webhook endpoints — built to offload webhook distribution from monitor logic in high-volume reselling setups. Uses Ktor, coroutines, and an in-memory queue.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages