mucking about trying to get camel-kafka-connect websockets working
This commit is contained in:
parent
83c991842f
commit
abada0bf4b
14 changed files with 122 additions and 29 deletions
|
|
@ -1,9 +1,28 @@
|
|||
import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs
|
||||
|
||||
plugins {
|
||||
id("dev.adamko.kafkatorio.infra.docker-compose")
|
||||
}
|
||||
|
||||
description = "Send events from a Factorio server to a Kafka topic "
|
||||
|
||||
|
||||
val dockerSrcDir: Directory by extra
|
||||
|
||||
tasks.dockerUp {
|
||||
dependsOn(":modules:infra-kafka-cluster:dockerUp")
|
||||
}
|
||||
|
||||
val dockerBuildKafkaPipe by tasks.registering(Exec::class) {
|
||||
group = "docker-compose"
|
||||
|
||||
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||
|
||||
dependsOn(tasks.dockerEnv)
|
||||
|
||||
inputs.dir(dockerSrcDir)
|
||||
|
||||
workingDir = dockerSrcDir.asFile
|
||||
commandLine = parseSpaceSeparatedArgs(""" docker-compose build kafka-pipe """)
|
||||
}
|
||||
tasks.assemble { dependsOn(dockerBuildKafkaPipe) }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ ENV KAFKA_HOST="kafka"
|
|||
USER root
|
||||
RUN apk add --update \
|
||||
curl \
|
||||
kafkacat
|
||||
kcat
|
||||
#USER rootless
|
||||
|
||||
COPY kafka-pipe.sh kafka-pipe.sh
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ INSTANCE_ID=$(cat /proc/sys/kernel/random/uuid)
|
|||
while :; do
|
||||
docker logs --tail 0 -f "$FACTORIO_SERVER_CONTAINER_NAME" |
|
||||
sed -n -e 's/^FactorioEvent: //p' |
|
||||
kafkacat -P -T -b "$KAFKA_HOST" -t factorio-server-log -k "$INSTANCE_ID"
|
||||
kcat -P -T -b "$KAFKA_HOST" -t factorio-server-log -k "$INSTANCE_ID"
|
||||
|
||||
echo "Error - retrying in 10 seconds"
|
||||
sleep 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue