title: Akka and Ask Pattern. When Actor is abruptly stopped can i return Future?
body: <p>I currently have code which dispatches a request using the Ask Pattern. The dispatched request will generate an Akka Actor which sends a HTTP request and then returns the response. I'm using Akka's circuit breaker API to manage issues with the upstream web services i call. </p>
  
  <p>If the circuitbreaker is in an open state then all subsequent requests are failing fast which is the desired effect. However when the actor fails fast it just throws a CircuitBreakerOpenException, stops the actor however control does not return to the code which made the initial request until an AskTimeoutException is generated. </p>
  
  <p>This is the code which dispatches the request</p>
  
  <pre><code>Timeout timeout = new Timeout(Duration.create(10, SECONDS));
  Future&lt;Object&gt; future = Patterns.ask(myActor, argMessage, timeout);
  Response res = (Response ) Await.result(future, timeout.duration());
  </code></pre>
  
  <p>This is the circuitbreaker</p>
  
  <pre><code>getSender().tell(breaker.callWithSyncCircuitBreaker(new Callable&lt;Obj&gt;() 
                      {
                          @Override
                          public Obj call() throws Exception {
                              return fetch(message);
                          }
                      }), getSelf()
              );
  getContext().stop(getSelf());
  </code></pre>
  
  <p>When this block of code is executed and if the circuit is open it fails fast throwing an exception however i want to return control back to the code which handles the future without having to wait for a timeout.</p>
  
  <p>Is this possible?</p>