In case of resilience i am trying to simulate a database breakdown.
public void createParticipationCheckWorkflowsForThis(Integer numberOfAdvices) {
participationAdviceSource.getParticipationAdvicesByAMaximumLimitOf(numberOfAdvices) // i want to retry this
.subscribe(participationAdviceSender::sendAdviceToWorkflowEngine);
}
My test scenario specifies that on the first database call, which is using Spring-R2DBC i return a flux error and on its second call a correct result.
when(participationAdviceSource.getParticipationAdvicesByAMaximumLimitOf(anyInt()))
.thenReturn(Flux.error(new RuntimeException()))
.thenReturn(Flux.just(ParticipationAdvice.builder().participationId(1L).build()));
My specific question is how can i retry the invoker/producer, because the retry mechanism of reactive retries the subscribe not the producer