Skip to content

Commit

Permalink
Merge pull request #458 from navikt/dev
Browse files Browse the repository at this point in the history
Flytte endring på mål til Aiven
  • Loading branch information
dragutin-nav authored Nov 25, 2022
2 parents b966960 + b50d631 commit 4e763c3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ public KafkaConfig(
kafkaProperties.getVeilederTilordnetTopic(),
kafkaProperties.getOppfolgingsperiodeTopic(),
kafkaProperties.getEndringPaManuellStatusTopic(),
kafkaProperties.getEndringPaNyForVeilederTopic()
kafkaProperties.getEndringPaNyForVeilederTopic(),
kafkaProperties.getEndringPaMalAiven()
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ public class KafkaProperties {
String sisteOppfolgingsperiodeTopic;
String oppfolgingsperiodeTopic;
String sisteTilordnetVeilederTopic;
String endringPaMalAiven;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4e763c3

Please sign in to comment.