title: Akka and blocked parallel processing
body: <p>I have a situation where I need to start a background process, and monitor if it has started. The manager actor starts a TCP connection. The data coming from the TCP connection is put into a non-blocking queue and is processed by a separate thread (needs to be separate as it takes a lot of processing power and the data comes in continuously, 30 times a second).</p>
  <p>I created a monitor actor and a manager actor. I first start the monitor actor, which waits for the processing thread to notify if data is coming in and is successfully processing. However, the problem is that the manager actor only start once getting the result of the monitoring actor times out. So the monitoring actor is blocking the the manager actor.</p>
  <p>How can I prevent that from happening, and have the monitoring tread not block?</p>
  <pre><code>@Override
  public boolean initialise(ActorSystem system) throws StreamingException {
      port = Integer.parseInt(source.getParameter(&quot;port&quot;));
      ipAddress = source.getParameter(&quot;ipAddress&quot;);
  
      try {
          lastResultMonitorActor = system.actorOf(Q16ResultMonitorActor.props());
          CompletableFuture&lt;String&gt; future = ask(lastResultMonitorActor, Q16MonitoringEnum.INIT , Duration.ofSeconds(10)).thenApplyAsync(response -&gt; (String) response).toCompletableFuture();
          getManagerActorRef().tell(Q16MonitoringEnum.VERSION_REQUEST, ActorRef.noSender());
          
          String version = future.get();
          isReady = version.length() &gt; 0;
          logger.info(&quot;Qu16 connection ready: &quot; + isReady);
      } catch (ExecutionException e) {
          if (e.getCause().getClass() == AskTimeoutException.class) {
              logger.debug(&quot;Time-out, the mixer might be off: &quot; + e.getMessage(), e);
              throw new StreamingException(&quot;No response from the Qu16 mixer, is it on?&quot;, StreamingStatus.AUDIO_SOURCE_NOT_RESPONDING, e);
          } else {
              logger.debug(&quot;ExecutionException on QU 16 request: &quot; + e.getMessage(), e);
              throw new StreamingException(&quot;Communication issue with the Qu16 mixer, is it on?&quot;, StreamingStatus.AUDIO_SOURCE_NOT_RESPONDING, e);
          }
      } catch (Exception e) {
          isReady = false;
          throw new StreamingException(&quot;Problem initiating the audio source: &quot; + e.getMessage(), AUDIO_SOURCE_WARNING, e);
      }
      return isReady;
  }
  </code></pre>