If a read operation of a stream causes an exception the onError() method of a reactive subscriber might be called twice. This is not allowed according to the reactive spec.
.
This is not a problem for the non-reactive API as the second onError() call is ignored by the ReadSuscriber used in the EventStoreDBClient.
When using the reactive API this might be a problem in certain conditions: framework like RxJava will unsubscribe after the first onError() call. The second error cannot be handled and will be delegated to the default error handler. For RxJava this will internally usually call the UncaughtExceptionHandler of the current thread. Depending of the context this might be ignored but in certain contexts this might break something. In our scenario it have been some tests.
I will provide an pull request for this as everything to fix it is already in place.
If a read operation of a stream causes an exception the
onError()
method of a reactive subscriber might be called twice. This is not allowed according to the reactive spec. . This is not a problem for the non-reactive API as the secondonError()
call is ignored by theReadSuscriber
used in theEventStoreDBClient
. When using the reactive API this might be a problem in certain conditions: framework like RxJava will unsubscribe after the firstonError()
call. The second error cannot be handled and will be delegated to the default error handler. For RxJava this will internally usually call theUncaughtExceptionHandler
of the current thread. Depending of the context this might be ignored but in certain contexts this might break something. In our scenario it have been some tests.I will provide an pull request for this as everything to fix it is already in place.