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.
Instead of each monitor sending webhooks directly to many destinations, monitors can send one payload to WebhookManager.
WebhookManager then handles fan-out delivery asynchronously.
- 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
- Kotlin (JVM target: 18)
- Ktor networking/client
- Kotlin coroutines
- Gradle (Kotlin DSL)
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 bindport: listening TCP port
From the project root:
./gradlew buildIf Gradle wrapper artifacts are unavailable in your environment, use:
gradle build./gradlew runWebhookManager expects a JSON structure equivalent to WebhookData:
webhooks: array of destination webhook URLsembeds: Discord-style webhook body object