title: Play framework, Akka Persistence, PersistenceQuery, unable to convert Source to Future Object for Action.async
body: <p>I am trying to get list of persistent events and send it as response(<code>Action.async</code>). But I am not able to convert <code>PersistenceQuery</code> results to <code>Future</code> object. Here is the code</p>
  
  <pre><code>val queries = PersistenceQuery(actorSystem).readJournalFor[CassandraReadJournal](CassandraReadJournal.Identifier)
  val source: Source[EventEnvelope, NotUsed] = queries.eventsByPersistenceId("MYID", 0, Long.MaxValue)
  val mappedSource: Source[JsValue, NotUsed] = source.mapAsync(1) { e =&gt;
        e.event match {
          case l: String =&gt;
             Future(Json.parse(l))
        }
     }
  val finalResult: Future[List[JsValue]] = mappedSource.take(10).runFold(List[JsValue]())((a, b) =&gt; {
        println(a)
        a :+ b
      })
  finalResult
  </code></pre>
  
  <p>I am able to see prints within <code>runFold</code>, but <code>finalResult</code> was never returned. I even tried to <code>Await</code>, even after waiting for minutes, it never returned. This <code>finalResult</code> shows all the user activity wanted to send it as response as <code>Action.async</code>.
  Please let me know what is the way to convert <code>Source</code> to <code>Future</code> object </p>