I'm trying to write into the Influxdb (running in a docker container with version 2.0). I'm using Scala and Reactive Streams. Therefore the Alpakka connector (https://doc.akka.io/docs/alpakka/current/influxdb.html) because the Scala Reactive Client (https://github.com/influxdata/influxdb-client-java/tree/master/client-scala) does not support writing into the database.
No matter how I try to write into the database, data is not written into it.
Source
.tick(1.seconds, 1.seconds,
Seq(
InfluxDbWriteMessage.create(
Point
.measurement("cpu_load_short")
.addField("host", "server01")
.addField("value", 0.64)
.tag("region", "us-west")
.time(DateTime.now.getMillis, java.util.concurrent.TimeUnit.MILLISECONDS)
.build,
).withDatabaseName("database"),
)
)
.toMat(
InfluxDbSink.create()(
InfluxDBFactory.connect("http://localhost:9091", "admin", "admin123")
)
)(Keep.right)
.run.andThen { case Success(posts) => print("done") }
Also "done" is never printed, so I assume the future is never completed and therefore somewhere is a problem.
The only thing that gets printed is
Pong{version=2.1.1, responseTime=68}
What am I missing, so that writing is not possible. Is it because the Alpakka connector is written for InfluxDB prior version 2 and therefore it does not work?