tomasfabian / ksqlDB.RestApi.Client-DotNet

ksqlDb.RestApi.Client is a C# LINQ-enabled client API for issuing and consuming ksqlDB push and pull queries and executing statements.
MIT License
94 stars 25 forks source link

KSqlDbContext's CreateStream and CreateStreamQuery influence each others services collection during consecutive usages. #37

Closed tomasfabian closed 1 year ago

tomasfabian commented 1 year ago

These 2 method calls should be executable on the same KSqlDBContext instance seamlessly:

var context = new KSqlDBContext(ksqlDBUrl);

_ = context.CreateQueryStream<int>();
_ = context.CreateQuery<int>();

Error during execution:

Invalid JSON in request: Missing required creator property 'sql' (index 0) at [Source: (byte[])"{"ksql":"SELECT ARRAY[1, 2] FROM Movies EMIT CHANGES LIMIT 2;","streamsProperties":{"ksql.streams.auto.offset.reset":"earliest"}}"; line: 1, column: 129] (through reference chain: io.confluent.ksql.rest.entity.QueryStreamArgs["sql"])

Environment (please complete the following information):