eventuate-tram/eventuate-tram-core

is Publisher<List<Message>> useful/meaningful?

cer opened this issue · 5 comments

cer commented

@ArtemSidorkin

I'm wondering whether it's useful/meaningful since Publisher can contain multiple messages.

Probably replacing publisher by flux can improve parallel processing. I will try.

cer commented

AFAIK a flux is a kind of publisher.
Not sure if you need to change the type.

I will check

cer commented

I believe that places in the code such as

(c, pv) -> Mono.from(handler.apply(c, pv)).map(Collections::singletonList).switchIfEmpty(Mono.just(Collections.emptyList()));
need to allow Publisher to contain multiple messages - not just 0 or 1.