Commit 0dacab14 authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade config para evitar session timeout

parent baca97fd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ package es.redmic.vesselrestrictionchecker.utils;

import java.util.Properties;

import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.errors.LogAndContinueExceptionHandler;
@@ -33,6 +34,9 @@ public class StreamsApplicationUtils {
		config.put(AUTO_OFFSET_RESET, autoOffsetReset);
		config.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 1); // commit as fast as possible

		config.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, 60000);
		config.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 15000);

		config.put(StreamsConfig.DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG,
				LogAndContinueExceptionHandler.class);