gAmUssA / reactor-ksqldb

A wrapper around ksqlDB Java Client using Project Reactor https://projectreactor.io/
https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-clients/java-client/
MIT License
0 stars 3 forks source link

enhancement : be able to consume message from topics #8

Open survivant opened 3 years ago

survivant commented 3 years ago

I create 2 streams orders, returns with topics that have the same names.

if I do pull request like :

List<Row> rows = reactorClient.executeQueryFromBeginning("select * from orders;").block();
rows.forEach(System.out::println);

I receive this error message :

io.confluent.ksql.api.client.exception.KsqlClientException: Received 400 response from server: Can't pull from `ORDERS` as it's not a materialized table. See https://cnfl.io/queries for more info.
Add EMIT CHANGES if you intended to issue a push query.
Statement: select * from orders;. Error code: 40001

I was expecting to receive all the items that are in the topic : orders.

I could create a table to use the stream orders but at the end, I think it shouldn't be mandatory to query a table.

there is a way from ksqldb api-client to retrieve the messages from a topic with a offset (in my case it's from the beginning)?