Is it possible to reconnect to the same push query after connection was lost?
There is a queryId for terminating a query. Is there a similar mechanism which could be used for reconnections via ksqldb REST API?
In case that the subscription stopped at offset 5, it should receive also the new messages (without skipping any of them) after offset 5 after reconnection, but without replaying the whole topic from the beginning again. The ideal would be exactly once processing for all messages (records), but at-least-once semantics are a must have in lot of scenarios.
"POST" "http://<ksqldb-host-name>:8088/query-stream"
{
"sql": "SELECT * FROM Movies EMIT CHANGES;",
"properties":{"auto.offset.reset":"earliest"}
}
Header response with queryID:
{"queryId":"f91157c7-cd12-407e-a173-5a4cbc398259","columnNames":["TITLE","ID","RELEASE_YEAR"],"columnTypes":["STRING","INTEGER","INTEGER"]}
What I'm probably missing is a programmatic way of committing the offsets.