Skip to content

Examples Ksql Response Inspect

synthaicode edited this page Nov 12, 2025 · 1 revision

Purpose: Inspect KsqlDbResponse to quickly validate KSQL calls and triage issues.

Why

  • Lightweight diagnostics: success flag + raw body snippet.
  • Attach raw body to incident reports.

How

await using var ctx = Ksql.Linq.Application.KsqlContextBuilder.Create()
    .UseConfiguration(configuration)
    .EnableLogging(loggerFactory)
    .BuildContext<MyContext>();
var res = await ctx.ExecuteStatementAsync("SHOW STREAMS;");
Console.WriteLine($"IsSuccess={res.IsSuccess} Body={res.Message.Substring(0, Math.Min(200, res.Message?.Length ?? 0))}");

Run (repo example)

  • cd examples/ksql-response-inspect
  • dotnet run

Clone this wiki locally