onErrorContinue not handling onErrorDropped error in Reactive Streams

62 Views Asked by At

I am using Reactive Streams in my Java project and trying to handle errors using the onErrorContinue operator provided by Reactive Streams. However, I noticed that when an error occurs and the onErrorContinue operator is used, it does not handle the onErrorDropped error that may occur if the error is not processed by downstream subscribers. Is this the expected behavior? If so, how can I handle the onErrorDropped error when using onErrorContinue?

    .window(Duration.ofSeconds(2))
    .flatMap(window ->
        window.distinct()
            .map(this::processItem)
            .onErrorContinue((error, item) -> log.error("Error occurred for item: " + item, error))
    )
    .subscribe();```


0

There are 0 best solutions below