diff --git a/src/main/java/no/nav/veilarboppfolging/config/KafkaConfig.java b/src/main/java/no/nav/veilarboppfolging/config/KafkaConfig.java index 73a0b7bad..f8c35b068 100644 --- a/src/main/java/no/nav/veilarboppfolging/config/KafkaConfig.java +++ b/src/main/java/no/nav/veilarboppfolging/config/KafkaConfig.java @@ -145,7 +145,8 @@ public KafkaConfig( kafkaProperties.getVeilederTilordnetTopic(), kafkaProperties.getOppfolgingsperiodeTopic(), kafkaProperties.getEndringPaManuellStatusTopic(), - kafkaProperties.getEndringPaNyForVeilederTopic() + kafkaProperties.getEndringPaNyForVeilederTopic(), + kafkaProperties.getEndringPaMalAiven() ) ); } diff --git a/src/main/java/no/nav/veilarboppfolging/config/KafkaProperties.java b/src/main/java/no/nav/veilarboppfolging/config/KafkaProperties.java index 71869eb33..a231e4d90 100644 --- a/src/main/java/no/nav/veilarboppfolging/config/KafkaProperties.java +++ b/src/main/java/no/nav/veilarboppfolging/config/KafkaProperties.java @@ -22,4 +22,5 @@ public class KafkaProperties { String sisteOppfolgingsperiodeTopic; String oppfolgingsperiodeTopic; String sisteTilordnetVeilederTopic; + String endringPaMalAiven; } diff --git a/src/main/java/no/nav/veilarboppfolging/service/KafkaProducerService.java b/src/main/java/no/nav/veilarboppfolging/service/KafkaProducerService.java index 92f96498b..efe32edb1 100644 --- a/src/main/java/no/nav/veilarboppfolging/service/KafkaProducerService.java +++ b/src/main/java/no/nav/veilarboppfolging/service/KafkaProducerService.java @@ -15,7 +15,7 @@ import java.time.ZonedDateTime; -import static no.nav.common.kafka.producer.util.ProducerUtils.*; +import static no.nav.common.kafka.producer.util.ProducerUtils.serializeJsonRecord; import static no.nav.pto_schema.kafka.json.JsonSchemaLocator.getKafkaSchema; @Service @@ -121,12 +121,13 @@ public void publiserEndretMal(AktorId aktorId, String veilederIdent) { .veilederIdent(veilederIdent) .lagtInnAv( authContextHolder.erEksternBruker() - ? EndringPaMalV1.InnsenderData.BRUKER - : EndringPaMalV1.InnsenderData.NAV + ? EndringPaMalV1.InnsenderData.BRUKER + : EndringPaMalV1.InnsenderData.NAV ) .build(); store(kafkaProperties.getEndringPaMalTopic(), aktorId.get(), recordValue); + store(kafkaProperties.getEndringPaMalAiven(), aktorId.get(), recordValue); } private void store(String topic, String key, Object value) { diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 08f7b0358..f911d93b7 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -28,3 +28,4 @@ app.kafka.endringPaMalTopic=endringPaMal-topic app.kafka.sisteOppfolgingsperiodeTopic=sisteOppfolgingsperiode-topic app.kafka.oppfolgingsperiodeTopic=oppfolgingsperiode-topic app.kafka.sisteTilordnetVeilederTopic=sisteTilordnetVeileder-topic +app.kafka.endringPaMalAiven=endringPaaMaal-topic diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e06699125..6ec0b6278 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -65,6 +65,7 @@ app.kafka.sisteTilordnetVeilederTopic=pto.siste-tilordnet-veileder-v1 app.kafka.veilederTilordnetTopic=pto.veileder-tilordnet-v1 app.kafka.endringPaManuellStatusTopic=pto.endring-paa-manuell-status-v1 app.kafka.endringPaNyForVeilederTopic=pto.endring-paa-ny-for-veileder-v1 +app.kafka.endringPaMalAiven=pto.endring-paa-maal-v1 app.datasource.url=${JDBC_URL:null} app.datasource.username=${JDBC_USERNAME:null}