Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publiser meldinger med Kafka-key i API-app #782

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Conversation

bjerga
Copy link
Contributor

@bjerga bjerga commented Nov 19, 2024

Dette er nødvendig for å sikre oss at meldingene på Kafka blir lest i samme rekkefølge som de blir skrevet.

@bjerga bjerga requested a review from a team as a code owner November 19, 2024 16:12
@@ -25,6 +25,7 @@ class HentForespoerslerProducer(
) {
rapid
.publish(
key = UUID.randomUUID(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Her har vi ingen naturlig nøkkel, men vi det er heller ikke så farlig når vi kun skal lese data.

@@ -253,7 +253,7 @@ abstract class EndToEndTest : ContainerTest() {

fun publish(vararg messageFields: Pair<Key, JsonElement>) {
println("Publiserer melding med felt: ${messageFields.toMap()}")
imTestRapid.publish(messageFields.toMap())
imTestRapid.publish(UUID.randomUUID(), *messageFields)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nøkkelen har ikke betydning her, da imTestRapid ikke er en ekte rapid.

@bjerga
Copy link
Contributor Author

bjerga commented Nov 20, 2024

Testet OK.

Copy link
Contributor

@b162214 b162214 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔑

@@ -15,6 +15,7 @@ import no.nav.helsearbeidsgiver.utils.log.MdcUtils
import no.nav.helsearbeidsgiver.utils.wrapper.Fnr
import java.util.UUID

// TODO test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skal denne være med?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tok den med som en påminnelse til fremtiden når jeg tilfeldigvis så at den klassen manglet tester.

@bjerga bjerga merged commit eb445a9 into main Nov 22, 2024
74 checks passed
@bjerga bjerga deleted the dev/api-publish-med-key branch November 22, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants