Replies: 1 comment
-
You might find a configuration for public static void Configure(this IServiceCollection services, string ksqlDbUrl)
{
services.AddDbContext<IKSqlDBContext, KSqlDBContext>(c =>
{
c.UseKSqlDb(ksqlDbUrl);
c.ReplaceHttpClient<IHttpClientFactory, ksqlDB.RestApi.Client.KSql.RestApi.Http.HttpClientFactory>(httpClient => {
httpClient.DefaultRequestHeaders.Add("Connection", "Keep-Alive"); //Find a proper configuration option
})
.AddHttpMessageHandler(_ => new CustomMessageHandler());
});
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using push queries on (source) tables that have infrequent updates.
The connections are aborted after 10 minutes.
I am using confluent cloud which does not allow to configure: ksql.idle.connection.timeout.seconds
A workaround is mentioned here: confluentinc/ksql#6970 (comment)
That involves calling some endpoint like listStreams periodically.
When creating a push query I have to use
IKSqlDBContext
This use a client under the hood to which I do not have access.
So I can not issue a periodic request using that client to keep the connection open.
Is there a way to keep push query connections alive similar to the mentioned workaround?
Beta Was this translation helpful? Give feedback.
All reactions