Skip to content

Instantly share code, notes, and snippets.

@VictorGil
Last active August 19, 2019 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VictorGil/118ae1a7605bacdb18012056d4af6050 to your computer and use it in GitHub Desktop.
Save VictorGil/118ae1a7605bacdb18012056d4af6050 to your computer and use it in GitHub Desktop.
Snippet of TransfersRecordingServiceJoinStreams.java
final KStream<String, Transfer> transfersKStream =
createInputKStream(stringSerde, configValues.getSchemaRegistryUrl(),
builder);
final Serde<AccountBalance> accountBalanceSerde =
createAccountBalanceSerde(configValues.getSchemaRegistryUrl());
final KTable<String,AccountBalance> accountBalancesKTable =
createInputKTable(stringSerde, accountBalanceSerde, builder);
final KStream<String, AccountBalance> newABstream = transfersKStream.join(
accountBalancesKTable, new TransferAndAccountBalanceJoiner());
newABstream.to(ACCOUNT_BALANCES_TOPIC, Produced.with(stringSerde, accountBalanceSerde));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment