Based on @Simon Baslé suggestion from here:
https://stackoverflow.com/a/65202495/15636190
I implemented this retry mechanism.
Sinks.EmitResult result;
while ((result = sink.tryEmitNext(object)) == Sinks.EmitResult.FAIL_NON_SERIALIZED) {
LockSupport.parkNanos(10);
}
In my tests I see that 30% requests fail with NON_SERIALIZED.
If I count how many times retry happens it gives average of 30 retries per single failed request until it eventually succeeds.
Is it expected to be that many?