I've got a complete Confluent Platform on an AKS cluster. I'm trying to send messages inside a ksqldb stream, but the messages arrive only on the topic. This is how I created the stream
"CREATE STREAM PROVA (ID STRING KEY, NUM INTEGER) WITH (KAFKA_TOPIC='topic_prova', KEY_FORMAT='KAFKA', PARTITIONS=1, VALUE_FORMAT='JSON');
and this is the code that sends messages
const KsqldbClient = require("ksqldb-client");
const options = {
host: "http://ksqldb.ckafka.svc.cluster.local",
port: 8088,
};
const client = new KsqldbClient(options);
const asyncOperation = async () => {
await client.connect();
var i = 0;
while(i<100){
const row = {
id: "value",
num: 2
};
const {data, status, error } = await client.insertInto("PROVA", row);
console.log(data)
console.log(status);
console.log(error)
i++;
await new Promise(resolve => setTimeout(resolve, 5000));
}
await client.disconnect();
};
asyncOperation();
Here the logs:
{ rows: [ { seq: 0, status: 'ok' } ] }
200
undefined
The topic receives the messages, like shown here.
I don't know how to resolve it, even because i need streams later to aggregate data.