{"action":"opened","issue":{"url":"https://api.github.com/repos/javaslang/javaslang/issues/1298","repository_url":"https://api.github.com/repos/javaslang/javaslang","labels_url":"https://api.github.com/repos/javaslang/javaslang/issues/1298/labels{/name}","comments_url":"https://api.github.com/repos/javaslang/javaslang/issues/1298/comments","events_url":"https://api.github.com/repos/javaslang/javaslang/issues/1298/events","html_url":"https://github.com/javaslang/javaslang/issues/1298","id":150920298,"number":1298,"title":"How to combine CompletableFuture.allOf and with retries and failed tasks?","user":{"login":"hugree","id":18511093,"avatar_url":"https://avatars.githubusercontent.com/u/18511093?v=3","gravatar_id":"","url":"https://api.github.com/users/hugree","html_url":"https://github.com/hugree","followers_url":"https://api.github.com/users/hugree/followers","following_url":"https://api.github.com/users/hugree/following{/other_user}","gists_url":"https://api.github.com/users/hugree/gists{/gist_id}","starred_url":"https://api.github.com/users/hugree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugree/subscriptions","organizations_url":"https://api.github.com/users/hugree/orgs","repos_url":"https://api.github.com/users/hugree/repos","events_url":"https://api.github.com/users/hugree/events{/privacy}","received_events_url":"https://api.github.com/users/hugree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-25T16:38:52Z","updated_at":"2016-04-25T16:38:52Z","closed_at":null,"body":"Hi,\r\n\r\nI have a simple case, I think, that I want to use your library for.\r\n\r\nI have a list of tasks that and I want to retry each task a number of times. However, I want to be able to get results from all tasks even when one of them fails completely and retry doesn't change the outcome.\r\n\r\nMy problem is the CompletableFuture.allOf method that I use to run all my suppliers.\r\n\r\nThis is how I produce suppliers:\r\n```java\r\nCircuitBreaker circuitBreaker = CircuitBreakerRegistry\r\n\t\t.of(new CircuitBreakerConfig.Builder().onCircuitBreakerEvent(this::onBreak).build())\r\n\t\t.circuitBreaker(\"mybreaker\");\r\n\r\nRetry retryContext = Retry.custom().maxAttempts(3).waitDuration(Duration.ofMillis(1500)).build();\r\n\r\nSupplier<String> decoratedWithCircuitBreaker = CircuitBreaker.decorateSupplier(() -> this::doStuff, circuitBreaker);\r\nSupplier<String> decoratedWithRetry = Retry.decorateSupplier(decorateSupplier, retryContext);\r\n```\r\n\r\nAfter that I stream all suppliers and  use CompletableFuture.allOf, but when one of the doStuff tasks fails the whole processing stops and allOf doesn't produce results anymore.\r\n\r\nWhat's the correct way to do this? How to setup the circuit breaker to \"swallow\" the exception after retrying fails?\r\n\r\nBtw... how to combine checked exception within the doStuff method and decorateCheckedSupplier and CompletableFuture, which requires a regular supplier?\r\n\r\nThanks!\r\n\r\n  "}}