Gerard Klijs
03/30/2018, 10:27 AM@StreamListener
fun receive(@Input(AccountCreation.CAC) input: Flux<ConfirmAccountCreation>,
@Output(AccountCreation.ACC) success: FluxSender,
@Output(AccountCreation.ACF) fail: FluxSender) {
input.map(this::getResponse)
.groupBy{it.succes.isPresent}
.flatMap { }
} I use a data class so I always return the same, only one of them is filled, data class Response (val succes: Optional<AccountCreationConfirmed>,
val failed: Optional<AccountCreationFailed>) at this moment I’m not really sure if I’m doing it correctly…